diff --git a/melos.yaml b/melos.yaml index 56d3b05..741a595 100644 --- a/melos.yaml +++ b/melos.yaml @@ -12,7 +12,7 @@ scripts: run: dart format . format:check: - run: dart format --set-exit-if-changed . --output=show + run: dart format --set-exit-if-changed . --output=none analyze: run: flutter analyze diff --git a/packages/iabtcf_consent_info_platform_interface/test/method_channel_iabtcf_consent_info_test.dart b/packages/iabtcf_consent_info_platform_interface/test/method_channel_iabtcf_consent_info_test.dart index bdcbc34..08b7dc3 100644 --- a/packages/iabtcf_consent_info_platform_interface/test/method_channel_iabtcf_consent_info_test.dart +++ b/packages/iabtcf_consent_info_platform_interface/test/method_channel_iabtcf_consent_info_test.dart @@ -11,10 +11,12 @@ void main() { final eventChannel = EventChannel(channelName); final methodChannel = MethodChannel(channelName); - test('startSendingUpdates', () async { + testWidgets('startSendingUpdates', (tester) async { var channelHasStartedListening = false; - methodChannel.setMockMethodCallHandler((call) async { + tester.binding.defaultBinaryMessenger + .setMockMethodCallHandler(methodChannel, (call) async { channelHasStartedListening = call.method == 'listen'; + return null; }); final firstEvent = @@ -24,7 +26,7 @@ void main() { var firstResult = {'key': 'value'}; - unawaited(eventChannel.binaryMessenger.handlePlatformMessage( + unawaited(tester.binding.defaultBinaryMessenger.handlePlatformMessage( channelName, eventChannel.codec.encodeSuccessEnvelope(firstResult), (data) {},