We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 49d4727 commit 909c5b6Copy full SHA for 909c5b6
__test__/locale.spec.ts
@@ -5,7 +5,7 @@ import { Language } from '../utils/getLanguage'
5
import { includeAllKeys, excludeKeys } from './utils'
6
7
const locales = readdirSync(resolve(__dirname, '../locales')).filter((file) => {
8
- return file.includes('.json') // exclude unnecessary files
+ return file.includes('.json')
9
})
10
11
describe('should match name regex', () => {
@@ -17,6 +17,7 @@ describe('should match name regex', () => {
17
* @example reusable locale: zh-Hant
18
*/
19
const regex = /^[a-zA-Z]{2}(-[a-zA-Z]{2})*.json$|^[a-zA-Z]{2}(-[a-zA-z]{4})*.json$/
20
+
21
locales.forEach((locale) => {
22
it(`for ${locale}`, () => {
23
expect(locale).toMatch(regex)
0 commit comments