From 0b4bb099fcdba2dd4bb1e6a117049b1d4f20fde1 Mon Sep 17 00:00:00 2001 From: Adriano Raiano Date: Thu, 21 Nov 2024 09:06:28 +0100 Subject: [PATCH] fix deno test --- .github/workflows/deno.yml | 2 +- test/deno/backend.json.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deno.yml b/.github/workflows/deno.yml index 09248ba..64a9086 100644 --- a/.github/workflows/deno.yml +++ b/.github/workflows/deno.yml @@ -11,7 +11,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - deno: [ '2.x' ] + deno: [ '2.x', '1.x' ] # os: [ubuntu-latest, windows-latest, macOS-latest] os: [ubuntu-latest] steps: diff --git a/test/deno/backend.json.js b/test/deno/backend.json.js index 84ff9ed..1e18003 100644 --- a/test/deno/backend.json.js +++ b/test/deno/backend.json.js @@ -9,6 +9,8 @@ const wait = (ms) => new Promise((resolve) => setTimeout(resolve, ms)) test('BackendConnector with normal json', async () => { // before + await writeFile(`${__dirname}/../locales/en/test.json`, { key: 'passing' }) + i18next.init({ fallbackLng: 'en', ns: 'test' }) const connector = i18next.services.backendConnector @@ -16,8 +18,6 @@ test('BackendConnector with normal json', async () => { loadPath: `${__dirname}/../locales/{{lng}}/{{ns}}.json`, addPath: `${__dirname}/../locales/{{lng}}/{{ns}}.json` }) - await wait(200) // I don't know why, probably because of debouncedWrite - await writeFile(`${__dirname}/../locales/en/test.json`, { key: 'passing' }) // test await (new Promise((resolve, reject) => {