Skip to content

Commit

Permalink
✅ fix browser test
Browse files Browse the repository at this point in the history
  • Loading branch information
techouse committed Aug 2, 2023
1 parent c9bc940 commit bacb7df
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion chopper/test/base_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,30 @@ void main() {
),
);
}
});
}, testOn: 'vm');

test('wrong type for interceptor', () {
expect(
() => ChopperClient(interceptors: [(bool foo) => 'bar']),
throwsA(isA<AssertionError>()),
);

try {
ChopperClient(
interceptors: [
(bool foo) => 'bar',
],
);
} on AssertionError catch (error) {
expect(
error.toString(),
contains(
'Unsupported type for interceptors, it only support the following types:\\n'
' - ${allowedInterceptorsType.join('\\n - ')}',
),
);
}
}, testOn: 'browser');

test('Query Map 1', () async {
final httpClient = MockClient((request) async {
Expand Down

0 comments on commit bacb7df

Please sign in to comment.