File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change 1- import 'package:logging/logging.dart' ;
1+ @TestOn ('!browser' )
2+
23import 'package:powersync/powersync.dart' ;
34import 'package:test/test.dart' ;
45
@@ -59,8 +60,9 @@ void main() {
5960 // Do nothing
6061 }
6162
62- final records = < LogRecord > [];
63- final sub = testWarningLogger.onRecord.listen (records.add);
63+ final records = < String > [];
64+ final sub =
65+ testWarningLogger.onRecord.listen ((log) => records.add (log.message));
6466
6567 powersync =
6668 await testUtils.setupPowerSync (path: path, logger: testWarningLogger);
@@ -82,9 +84,8 @@ void main() {
8284
8385 sub.cancel ();
8486
85- var warningLogs = records.where ((r) => r.level == Level .WARNING ).toList ();
86- expect (warningLogs, hasLength (2 ));
87- expect (warningLogs[0 ].message, contains (partialWarning));
87+ expect (records, hasLength (2 ));
88+ expect (records, anyElement (contains (partialWarning)));
8889 });
8990 });
9091}
You can’t perform that action at this time.
0 commit comments