aboutsummaryrefslogtreecommitdiff
path: root/test/modules
diff options
context:
space:
mode:
authorST-DDT <[email protected]>2023-12-11 19:42:59 +0100
committerGitHub <[email protected]>2023-12-11 18:42:59 +0000
commit1631115a6a9846c50473fe60ea5bdb7ce9d04084 (patch)
tree6b9dcb203e31aea8ff2233ef60046278139ea71b /test/modules
parent60dcfe7c6454327740d2253ed283deb59d420462 (diff)
downloadfaker-1631115a6a9846c50473fe60ea5bdb7ce9d04084.tar.xz
faker-1631115a6a9846c50473fe60ea5bdb7ce9d04084.zip
infra(tsconfig): noImplicitAny (#2562)
Diffstat (limited to 'test/modules')
-rw-r--r--test/modules/helpers.spec.ts8
-rw-r--r--test/modules/image.spec.ts2
2 files changed, 6 insertions, 4 deletions
diff --git a/test/modules/helpers.spec.ts b/test/modules/helpers.spec.ts
index 766d0650..1a1db9c5 100644
--- a/test/modules/helpers.spec.ts
+++ b/test/modules/helpers.spec.ts
@@ -1,6 +1,7 @@
import { describe, expect, it } from 'vitest';
import { faker, FakerError } from '../../src';
import { luhnCheck } from '../../src/modules/helpers/luhn-check';
+import type { RecordKey } from '../../src/modules/helpers/unique';
import { seededTests } from '../support/seeded-runs';
import { times } from './../support/times';
import './../vitest-extensions';
@@ -1295,8 +1296,9 @@ Try adjusting maxTime or maxRetries parameters for faker.helpers.unique().`)
const maxTime = 49;
const maxRetries = 49;
const currentIterations = 0;
- const exclude = [];
- const compare = (obj, key) => (obj[key] === undefined ? -1 : 0);
+ const exclude: string[] = [];
+ const compare = (obj: Record<RecordKey, RecordKey>, key: RecordKey) =>
+ obj[key] === undefined ? -1 : 0;
const options = {
startTime,
@@ -1318,7 +1320,7 @@ Try adjusting maxTime or maxRetries parameters for faker.helpers.unique().`)
});
it('should be possible to pass a user-specific store', () => {
- const store = {};
+ const store: Record<string, string> = {};
const method = () => 'with conflict: 0';
diff --git a/test/modules/image.spec.ts b/test/modules/image.spec.ts
index 938799ef..004905e7 100644
--- a/test/modules/image.spec.ts
+++ b/test/modules/image.spec.ts
@@ -257,7 +257,7 @@ describe('image', () => {
'objects',
'people',
'technology',
- ];
+ ] satisfies Array<keyof typeof faker.image.unsplash>;
describe.each(categories)(`%s()`, (category) => {
it(`should return a random ${category} image url`, () => {