From c0f5c164d67bb7c82466e383bd3d3283dec40a01 Mon Sep 17 00:00:00 2001 From: david-vaclavek Date: Thu, 18 Apr 2024 15:37:02 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=AA=20test:=20numeric=20value=20in=20t?= =?UTF-8?q?he=20import=20JSON=20structure?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/specs/import.spec.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/specs/import.spec.ts b/tests/specs/import.spec.ts index ac6c615..2c31e08 100644 --- a/tests/specs/import.spec.ts +++ b/tests/specs/import.spec.ts @@ -15,13 +15,14 @@ describe('Import', (): void => { }); test('api.import.json', async (): Promise => { - const json: I18nJson = { en: { headers: { person: 'Active person' } } }; + const json: I18nJson = { en: { headers: { person: 'Active person' }, 99: { luft: 'baloons' } } }; const request: ImportJsonRequest = { project, json, fileOptions: { name: 'en.json' } }; const spy: MockInstance = vi.spyOn(globalThis, 'fetch'); await api.import.json(request); expect(spy).toHaveBeenCalledWith('https://api.localazy.com/projects/_a0000000000000000001/import', { - body: '{"files":[{"name":"en.json","content":{"type":"json","en":{"headers":{"person":"Active person"}}}}]}', + // eslint-disable-next-line max-len + body: '{"files":[{"name":"en.json","content":{"type":"json","en":{"99":{"luft":"baloons"},"headers":{"person":"Active person"}}}}]}', headers: { Accept: 'application/json', Authorization: `Bearer ${getToken()}`,