Skip to content

Commit 7113857

Browse files
authored
fix(firebase_remote_config, web): update getSource method call in RemoteConfig class and add test for getAll() method (#17847)
1 parent 2e85c8a commit 7113857

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

packages/firebase_remote_config/firebase_remote_config_web/lib/src/interop/firebase_remote_config.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ class RemoteConfig
123123
remote_config_interop.getValue(jsObject, key.toJS).asString().toDart,
124124
),
125125
getSource(
126-
remote_config_interop.getValue(jsObject, key.toJS).asString().toDart,
126+
remote_config_interop.getValue(jsObject, key.toJS).getSource().toDart,
127127
),
128128
);
129129

tests/integration_test/firebase_remote_config/firebase_remote_config_e2e_test.dart

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,19 @@ void main() {
154154
expect(FirebaseRemoteConfig.instance.getDouble('does-not-exist'), 0.0);
155155
});
156156

157+
test(
158+
'getAll() returns without throwing',
159+
() async {
160+
try {
161+
await FirebaseRemoteConfig.instance.fetchAndActivate();
162+
FirebaseRemoteConfig.instance.getAll();
163+
} on UnimplementedError catch (e) {
164+
fail('getAll() threw an exception: $e');
165+
}
166+
},
167+
skip: !kIsWeb,
168+
);
169+
157170
group('setCustomSignals()', () {
158171
test('valid signal values; `string`, `number` & `null`', () async {
159172
const signals = <String, Object?>{

0 commit comments

Comments
 (0)