Skip to content

Commit 0fbf89f

Browse files
david-vaclavekdavid-vaclavek
andauthored
🧪 test: numeric value in the import JSON structure (#15)
Co-authored-by: david-vaclavek <[email protected]>
1 parent a734f6f commit 0fbf89f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/specs/import.spec.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,14 @@ describe('Import', (): void => {
1515
});
1616

1717
test('api.import.json', async (): Promise<void> => {
18-
const json: I18nJson = { en: { headers: { person: 'Active person' } } };
18+
const json: I18nJson = { en: { headers: { person: 'Active person' }, 99: { luft: 'baloons' } } };
1919
const request: ImportJsonRequest = { project, json, fileOptions: { name: 'en.json' } };
2020
const spy: MockInstance = vi.spyOn(globalThis, 'fetch');
2121
await api.import.json(request);
2222

2323
expect(spy).toHaveBeenCalledWith('https://api.localazy.com/projects/_a0000000000000000001/import', {
24-
body: '{"files":[{"name":"en.json","content":{"type":"json","en":{"headers":{"person":"Active person"}}}}]}',
24+
// eslint-disable-next-line max-len
25+
body: '{"files":[{"name":"en.json","content":{"type":"json","en":{"99":{"luft":"baloons"},"headers":{"person":"Active person"}}}}]}',
2526
headers: {
2627
Accept: 'application/json',
2728
Authorization: `Bearer ${getToken()}`,

0 commit comments

Comments
 (0)