Skip to content

Commit ac8904d

Browse files
committed
test: fix all functional tests
1 parent 5642470 commit ac8904d

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

test/all_functional.spec.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,12 @@ const modules = modulesList();
5555
describe('functional tests', () => {
5656
for (const locale in faker.locales) {
5757
describe(locale, () => {
58-
faker.locale = locale;
58+
// TODO: Enable after https://github.com/faker-js/faker/pull/269
59+
//it('title', () => {
60+
// faker.locale = locale;
61+
// expect(faker.definitions.title).toBe(faker.locales[locale].title);
62+
//});
63+
5964
Object.keys(modules).forEach((module) => {
6065
describe(module, () => {
6166
// if there is nothing to test, create a dummy test so the test runner doesn't complain
@@ -65,6 +70,7 @@ describe('functional tests', () => {
6570

6671
modules[module].forEach((meth) => {
6772
it(meth + '()', () => {
73+
faker.locale = locale;
6874
const result = faker[module][meth]();
6975
if (meth === 'boolean') {
7076
expect(result).toBeTypeOf('boolean');
@@ -96,7 +102,7 @@ describe('faker.fake functional tests', () => {
96102
const result = faker.fake('{{' + module + '.' + meth + '}}');
97103
// just make sure any result is returned
98104
// an undefined result usually means an error
99-
expect(result).toBeDefined();
105+
expect(result).toBeTypeOf('string');
100106
// if (meth === 'boolean') {
101107
// expect(result).toBeTypeOf('boolean');
102108
// } else {

0 commit comments

Comments
 (0)