Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
nicksnyder committed Feb 5, 2024
1 parent dea19ea commit cc9ad86
Showing 1 changed file with 9 additions and 29 deletions.
38 changes: 9 additions & 29 deletions i18n/parse_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,35 +46,15 @@ func TestParseMessageFileBytes(t *testing.T) {
}},
},
},
// {
// name: "basic test",
// file: `{"id": "hello", "other": "world", "foo": "bar"}`,
// path: "en.json",
// messageFile: &MessageFile{
// Path: "en.json",
// Tag: language.English,
// Format: "json",
// Messages: []*Message{{
// ID: "hello",
// Other: "world",
// }},
// },
// },
// {
// name: "basic test reserved key top level",
// file: `{"other": "world"}`,
// path: "en.json",
// messageFile: &MessageFile{
// Path: "en.json",
// Tag: language.English,
// Format: "json",
// Messages: []*Message{{
// ID: "other",
// Other: "world",
// }},
// },
// },

{
name: "basic test reserved key top level",
file: `{"other": "world", "foo": "bar"}`,
path: "en.json",
err: &mixedKeysError{
reservedKeys: []string{"other"},
unreservedKeys: []string{"foo"},
},
},
{
name: "basic test with dot separator in key",
file: `{"prepended.hello": "world"}`,
Expand Down

0 comments on commit cc9ad86

Please sign in to comment.