@@ -666,39 +666,50 @@ void main() {
666
666
await expectLater (SentryFlutter .pauseAppHangTracking (), completes);
667
667
});
668
668
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
- );
681
-
682
- expect (actualOptions! .exceptionTypeIdentifiers.length, 2 );
683
- // Flutter identifier should be first as it's more specific
684
- expect (
685
- actualOptions! .exceptionTypeIdentifiers.first,
686
- isA <CachingExceptionTypeIdentifier >().having (
687
- (c) => c.identifier,
688
- 'wrapped identifier' ,
689
- isA <FlutterExceptionTypeIdentifier >(),
690
- ),
691
- );
692
- expect (
693
- actualOptions! .exceptionTypeIdentifiers[1 ],
694
- isA <CachingExceptionTypeIdentifier >().having (
695
- (c) => c.identifier,
696
- 'wrapped identifier' ,
697
- isA <DartExceptionTypeIdentifier >(),
698
- ),
699
- );
700
-
701
- await Sentry .close ();
669
+ group ('exception identifiers' , () {
670
+ setUp (() async {
671
+ loadTestPackage ();
672
+ await Sentry .close ();
673
+ });
674
+
675
+ test (
676
+ 'should add DartExceptionTypeIdentifier and FlutterExceptionTypeIdentifier by default' ,
677
+ () async {
678
+ SentryOptions ? actualOptions;
679
+ await SentryFlutter .init (
680
+ (options) {
681
+ options.dsn = fakeDsn;
682
+ options.automatedTestMode = true ;
683
+ actualOptions = options;
684
+ },
685
+ appRunner: appRunner,
686
+ platformChecker: getPlatformChecker (
687
+ platform: MockPlatform .android (),
688
+ isWeb: true ,
689
+ ),
690
+ );
691
+
692
+ expect (actualOptions! .exceptionTypeIdentifiers.length, 2 );
693
+ // Flutter identifier should be first as it's more specific
694
+ expect (
695
+ actualOptions! .exceptionTypeIdentifiers.first,
696
+ isA <CachingExceptionTypeIdentifier >().having (
697
+ (c) => c.identifier,
698
+ 'wrapped identifier' ,
699
+ isA <FlutterExceptionTypeIdentifier >(),
700
+ ),
701
+ );
702
+ expect (
703
+ actualOptions! .exceptionTypeIdentifiers[1 ],
704
+ isA <CachingExceptionTypeIdentifier >().having (
705
+ (c) => c.identifier,
706
+ 'wrapped identifier' ,
707
+ isA <DartExceptionTypeIdentifier >(),
708
+ ),
709
+ );
710
+
711
+ await Sentry .close ();
712
+ });
702
713
});
703
714
}
704
715
0 commit comments