From 3b66314cba146557870ecb75ba6dc1637be0c549 Mon Sep 17 00:00:00 2001 From: GIancarlo Buenaflor Date: Wed, 9 Oct 2024 16:06:27 +0200 Subject: [PATCH] update --- flutter/test/sentry_native_channel_test.dart | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/flutter/test/sentry_native_channel_test.dart b/flutter/test/sentry_native_channel_test.dart index 0428349d4..88155cb1a 100644 --- a/flutter/test/sentry_native_channel_test.dart +++ b/flutter/test/sentry_native_channel_test.dart @@ -52,6 +52,21 @@ void main() { expect(actual?.isColdStart, true); }); + test('invalid fetchNativeAppStart returns null', () async { + when(channel.invokeMethod('fetchNativeAppStart')) + .thenAnswer((_) async => { + 'pluginRegistrationTime': 'invalid', + 'appStartTime': 'invalid', + 'isColdStart': 'invalid', + // ignore: inference_failure_on_collection_literal + 'nativeSpanTimes': 'invalid', + }); + + final actual = await sut.fetchNativeAppStart(); + + expect(actual, isNull); + }); + test('beginNativeFrames', () async { when(channel.invokeMethod('beginNativeFrames')) .thenAnswer((realInvocation) async {});