Skip to content

Commit

Permalink
Merge branch 'main' into renovate/devdependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Shinigami92 committed Apr 4, 2022
2 parents a2a74d5 + fb1b87e commit 9158389
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/random.ts
Expand Up @@ -326,7 +326,7 @@ export class Random {
const randomWordMethod = this.faker.random.arrayElement(wordMethods);

result = randomWordMethod();
} while (bannedChars.some((char) => result.includes(char)));
} while (!result || bannedChars.some((char) => result.includes(char)));

return this.faker.random.arrayElement(result.split(' '));
}
Expand Down
15 changes: 15 additions & 0 deletions test/system.spec.ts
Expand Up @@ -268,4 +268,19 @@ describe('system', () => {
});
}
});

describe('extra tests', () => {
describe('commonFileName()', () => {
afterEach(() => {
faker.locale = 'en';
});

it('#770', () => {
faker.seed(5423027051750305);
faker.setLocale('sk');
faker.system.commonFileName('xml');
faker.system.commonFileName('xml');
});
});
});
});

0 comments on commit 9158389

Please sign in to comment.