Skip to content

Commit

Permalink
fix deno test
Browse files Browse the repository at this point in the history
  • Loading branch information
adrai committed Nov 21, 2024
1 parent 735143d commit 0b4bb09
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deno.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions test/deno/backend.json.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ 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
connector.backend = new Backend(i18next.services, {
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) => {
Expand Down

0 comments on commit 0b4bb09

Please sign in to comment.