Skip to content

Commit

Permalink
fix(tests): Prepare for fix to flutter/flutter#109339. (#9364)
Browse files Browse the repository at this point in the history
  • Loading branch information
stereotype441 committed Aug 22, 2022
1 parent e675250 commit 7418dfd
Showing 1 changed file with 8 additions and 1 deletion.
Expand Up @@ -24,7 +24,14 @@ void main() {
test('Cannot be implemented with `implements`', () {
expect(() {
FirebasePlatform.instance = ImplementsFirebasePlatform();
}, throwsNoSuchMethodError);
// In versions of `package:plugin_platform_interface` prior to fixing
// https://github.com/flutter/flutter/issues/109339, an attempt to
// implement a platform interface using `implements` would sometimes
// throw a `NoSuchMethodError` and other times throw an
// `AssertionError`. After the issue is fixed, an `AssertionError` will
// always be thrown. For the purpose of this test, we don't really care
// what exception is thrown, so just allow any exception.
}, throwsA(anything));
});

test('Can be mocked with `implements`', () {
Expand Down

0 comments on commit 7418dfd

Please sign in to comment.