diff options
| author | Shinigami <[email protected]> | 2022-02-20 18:32:49 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-02-20 18:32:49 +0100 |
| commit | bfa7946f7ef5c025c2af9165191ffced4a7dde9d (patch) | |
| tree | 5c3e0e619b529be10da0be5b1f83d71437c9436f /test/random.spec.ts | |
| parent | 2448aab2fca711ef18857e27690f94440b517d84 (diff) | |
| download | faker-bfa7946f7ef5c025c2af9165191ffced4a7dde9d.tar.xz faker-bfa7946f7ef5c025c2af9165191ffced4a7dde9d.zip | |
test: use toBeTypeOf (#511)
Diffstat (limited to 'test/random.spec.ts')
| -rw-r--r-- | test/random.spec.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/random.spec.ts b/test/random.spec.ts index e969817f..07b2a0f5 100644 --- a/test/random.spec.ts +++ b/test/random.spec.ts @@ -82,7 +82,7 @@ describe('random', () => { const actual = faker.random.word(); expect(actual).toBeTruthy(); - expect(typeof actual).toBe('string'); + expect(actual).toBeTypeOf('string'); }); }); @@ -91,7 +91,7 @@ describe('random', () => { const actual = faker.random.words(); expect(actual).toBeTruthy(); - expect(typeof actual).toBe('string'); + expect(actual).toBeTypeOf('string'); const words = actual.split(' '); expect(words.length).greaterThanOrEqual(1); @@ -102,7 +102,7 @@ describe('random', () => { const actual = faker.random.words(5); expect(actual).toBeTruthy(); - expect(typeof actual).toBe('string'); + expect(actual).toBeTypeOf('string'); const words = actual.split(' '); expect(words).toHaveLength(5); @@ -114,7 +114,7 @@ describe('random', () => { const actual = faker.random.locale(); expect(actual).toBeTruthy(); - expect(typeof actual).toBe('string'); + expect(actual).toBeTypeOf('string'); expect(Object.keys(faker.locales)).toContain(actual); }); }); |
