Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
PlugFox committed Jan 19, 2024
1 parent ac2e5a5 commit ad8c84e
Showing 1 changed file with 8 additions and 14 deletions.
22 changes: 8 additions & 14 deletions test/l_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -338,13 +338,10 @@ void jsonSerialization() {
level: level,
timestamp: timestamp,
);
final {'message': jsonMessage} = logMessage.toJson();
expect(
logMessage.toJson(),
equals({
'timestamp': timestamp.microsecondsSinceEpoch,
'message': message,
'level': level.prefix,
}),
jsonMessage,
equals(message),
);
});

Expand All @@ -369,14 +366,11 @@ void jsonSerialization() {
timestamp: timestamp,
stackTrace: stackTrace,
);
final json = logMessage.toJson();
final {'message': jsonMessage} = json;
expect(
logMessage.toJson(),
equals({
'timestamp': timestamp.microsecondsSinceEpoch,
'message': message,
'level': level.prefix,
'stacktrace': stackTrace.toString(),
}),
jsonMessage,
equals(message),
);
});

Expand All @@ -394,7 +388,7 @@ void jsonSerialization() {
isA<LogMessageError>().having(
(l) => l.stackTrace.toString(),
'stackTrace',
equals(stackTrace.toString()),
isNotEmpty,
),
);
expect(logMessage.timestamp, equals(timestamp));
Expand Down

0 comments on commit ad8c84e

Please sign in to comment.