We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 97db2b2 commit a0b23f8Copy full SHA for a0b23f8
test/locale-imports.spec.ts
@@ -0,0 +1,13 @@
1
+import { describe, expect, it } from 'vitest';
2
+import allLocales from '../src/locales';
3
+
4
+describe('locale imports', () => {
5
+ for (const locale in allLocales) {
6
+ it(`should be possible to directly require('@faker-js/faker/locale/${locale}')`, () => {
7
+ const faker = require(`../dist/cjs/locale/${locale}`);
8
9
+ expect(faker).toBeDefined();
10
+ expect(faker.locale).toBe(locale);
11
+ });
12
+ }
13
+});
0 commit comments