Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mosuem committed Jan 8, 2025
1 parent 320eae6 commit 0b79236
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
10 changes: 2 additions & 8 deletions pkgs/messages_serializer/test/messages_serializer_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,7 @@ void main() {
final serialized = JsonSerializer().serialize('hash', 'locale', messages);
final deserialize =
JsonDeserializer(serialized.data).deserialize(intlPluralSelector);
expect(
deserialize.messages,
orderedEquals(messages),
);
compareMessages(deserialize.messages, messages);
});

test('Serialize partially', () {
Expand All @@ -84,10 +81,7 @@ void main() {
JsonSerializer().serialize('hash', 'locale', messages, [1, 3]);
final deserialize =
JsonDeserializer(serialized.data).deserialize(intlPluralSelector);
expect(
deserialize.messages,
orderedEquals([messages[1], messages[3]]),
);
compareMessages(deserialize.messages, [messages[1], messages[3]]);
});

test('First serialize, then deserialize again', () {
Expand Down
2 changes: 1 addition & 1 deletion pkgs/messages_shrinker/lib/messages_shrinker.dart
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class MessageShrinker {
'just immediately reserialized, this selector will not be called.');
},
);
final data = JsonSerializer(json.preamble.hasIds)
final data = JsonSerializer()
.serialize(
json.preamble.hash,
json.preamble.locale,
Expand Down
2 changes: 1 addition & 1 deletion pkgs/messages_shrinker/test/testarb.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[0,"","",0,null,["Welcome von <",[8,0],[13,1]],[6,"test ",[3,0,["test new messages",[5,0]],[2,"No new messages",4,"One new message",5,"Two new Messages"]]],[6,"test ",[4,0,["test new messages of type ",[5,0],[27,1]],{"male":"No new messages","female":"One new message"}]]]
[0,"","",null,["Welcome von <",[8,0],[13,1]],[6,"test ",[3,0,["test new messages",[5,0]],[0,"No new messages",1,"One new message","w2","Two new Messages"]]],[6,"test ",[4,0,["test new messages of type ",[5,0],[27,1]],{"male":"No new messages","female":"One new message"}]]]

0 comments on commit 0b79236

Please sign in to comment.