Socialify

Folder ..

Viewing locales.spec.ts
15 lines (13 loc) • 437.0 B

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
import { describe, expect, it } from 'vitest';
import { faker } from '../dist/cjs';

// Remark: actual use of locales functionality is currently tested in all.functional.js test

describe('locale', () => {
  describe('setLocale()', () => {
    it('setLocale() changes faker.locale', () => {
      for (const locale in faker.locales) {
        faker.setLocale(locale);
        expect(faker.locale).toBe(locale);
      }
    });
  });
});