Skip to content

Commit

Permalink
fix: add ini as dev
Browse files Browse the repository at this point in the history
  • Loading branch information
CoolPlayLin committed Dec 9, 2023
1 parent 80b665d commit b828a39
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
3 changes: 2 additions & 1 deletion __test__/locale.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { describe, it, expect } from 'vitest'
import { resolve } from 'node:path'
import { parse } from 'ini'
import { readdirSync } from 'node:fs'
import en from '../locales/en-US.json'

Expand All @@ -22,7 +23,7 @@ const defaultKeys = getKeys(en);
describe("locale files should include all keys", () => {
localesOtherThanEnglish.forEach((locale) => {
it(`for ${locale}`, () => {
expect(getKeys(require(`../locales/${locale}`))).toEqual(defaultKeys)
expect(getKeys(parse(`../locales/${locale}`))).toEqual(defaultKeys)
})
})
})
6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,12 @@
"prettier": "^3.1.0",
"prompts": "^2.4.2",
"vitest": "^1.0.1",
"zx": "^7.2.3"
"zx": "^7.2.3",
"ini": "^4.1.1"
},
"lint-staged": {
"*.{js,ts,vue,json}": [
"prettier --write"
]
},
"dependencies": {
"ini": "^4.1.1"
}
}
9 changes: 4 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b828a39

Please sign in to comment.