Skip to content

Commit 1673a1c

Browse files
committed
Set in own group
1 parent 71c4af9 commit 1673a1c

File tree

1 file changed

+39
-37
lines changed

1 file changed

+39
-37
lines changed

flutter/test/sentry_flutter_test.dart

+39-37
Original file line numberDiff line numberDiff line change
@@ -666,43 +666,45 @@ void main() {
666666
await expectLater(SentryFlutter.pauseAppHangTracking(), completes);
667667
});
668668

669-
test(
670-
'should add DartExceptionTypeIdentifier and FlutterExceptionTypeIdentifier by default',
671-
() async {
672-
SentryOptions? actualOptions;
673-
await SentryFlutter.init(
674-
(options) {
675-
options.dsn = fakeDsn;
676-
options.automatedTestMode = true;
677-
actualOptions = options;
678-
},
679-
appRunner: appRunner,
680-
platformChecker: getPlatformChecker(
681-
platform: MockPlatform.android(),
682-
isWeb: true,
683-
),
684-
);
685-
686-
expect(actualOptions!.exceptionTypeIdentifiers.length, 2);
687-
// Flutter identifier should be first as it's more specific
688-
expect(
689-
actualOptions!.exceptionTypeIdentifiers.first,
690-
isA<CachingExceptionTypeIdentifier>().having(
691-
(c) => c.identifier,
692-
'wrapped identifier',
693-
isA<FlutterExceptionTypeIdentifier>(),
694-
),
695-
);
696-
expect(
697-
actualOptions!.exceptionTypeIdentifiers[1],
698-
isA<CachingExceptionTypeIdentifier>().having(
699-
(c) => c.identifier,
700-
'wrapped identifier',
701-
isA<DartExceptionTypeIdentifier>(),
702-
),
703-
);
704-
705-
await Sentry.close();
669+
group('exception identifiers', () {
670+
test(
671+
'should add DartExceptionTypeIdentifier and FlutterExceptionTypeIdentifier by default',
672+
() async {
673+
SentryOptions? actualOptions;
674+
await SentryFlutter.init(
675+
(options) {
676+
options.dsn = fakeDsn;
677+
options.automatedTestMode = true;
678+
actualOptions = options;
679+
},
680+
appRunner: appRunner,
681+
platformChecker: getPlatformChecker(
682+
platform: MockPlatform.android(),
683+
isWeb: true,
684+
),
685+
);
686+
687+
expect(actualOptions!.exceptionTypeIdentifiers.length, 2);
688+
// Flutter identifier should be first as it's more specific
689+
expect(
690+
actualOptions!.exceptionTypeIdentifiers.first,
691+
isA<CachingExceptionTypeIdentifier>().having(
692+
(c) => c.identifier,
693+
'wrapped identifier',
694+
isA<FlutterExceptionTypeIdentifier>(),
695+
),
696+
);
697+
expect(
698+
actualOptions!.exceptionTypeIdentifiers[1],
699+
isA<CachingExceptionTypeIdentifier>().having(
700+
(c) => c.identifier,
701+
'wrapped identifier',
702+
isA<DartExceptionTypeIdentifier>(),
703+
),
704+
);
705+
706+
await Sentry.close();
707+
});
706708
});
707709
}
708710

0 commit comments

Comments
 (0)