Skip to content

Commit

Permalink
Merge branch 'next' into refactor/locale/activate-data-normalization-…
Browse files Browse the repository at this point in the history
…for-color
  • Loading branch information
ST-DDT authored Apr 21, 2024
2 parents 1b8f617 + 81d0718 commit 416e89e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
1 change: 0 additions & 1 deletion .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ module.exports = defineConfig({
'unicorn/better-regex': 'off',
'unicorn/consistent-function-scoping': 'off',
'unicorn/import-style': 'off',
'unicorn/no-await-expression-member': 'off',
'unicorn/no-object-as-default-parameter': 'off',
'unicorn/numeric-separators-style': 'off',
'unicorn/prefer-export-from': 'off',
Expand Down
4 changes: 1 addition & 3 deletions scripts/generate-locales.ts
Original file line number Diff line number Diff line change
Expand Up @@ -337,9 +337,7 @@ async function normalizeLocaleFile(filePath: string, definitionKey: string) {

console.log(`Running data normalization for:`, filePath);

const fileContent = (
await readFile(filePath, { encoding: 'utf8' })
).toString();
const fileContent = await readFile(filePath, { encoding: 'utf8' });
const searchString = 'export default ';
const compareIndex = fileContent.indexOf(searchString) + searchString.length;
const compareString = fileContent.substring(compareIndex);
Expand Down
3 changes: 2 additions & 1 deletion test/faker.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ describe('faker', () => {
.filter((key) => typeof console[key] === 'function')
.map((methodName) => vi.spyOn(console, methodName));

(await import('..')).default;
const file: unknown = await import('..');
expect(file).toBeDefined();

new Faker({ locale: { metadata: { title: '' } } });

Expand Down
4 changes: 2 additions & 2 deletions test/scripts/apidocs/verify-jsdoc-tags.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ ${examples}`;
assertDescription(signature.description);
});

it('verify @example tag', async () => {
it('verify @example tag', { timeout: 30000 }, async () => {
const examples = signature.examples.join('\n');

expect(
Expand All @@ -171,7 +171,7 @@ ${examples}`;

// This only checks whether the whole method is deprecated or not
// It does not check whether the method is deprecated for a specific set of arguments
it('verify @deprecated tag', async () => {
it('verify @deprecated tag', { timeout: 30000 }, async () => {
// Grab path to example file
const path = resolvePathToMethodFile(
moduleName,
Expand Down

0 comments on commit 416e89e

Please sign in to comment.