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/hacker.spec.ts | |
| parent | 2448aab2fca711ef18857e27690f94440b517d84 (diff) | |
| download | faker-bfa7946f7ef5c025c2af9165191ffced4a7dde9d.tar.xz faker-bfa7946f7ef5c025c2af9165191ffced4a7dde9d.zip | |
test: use toBeTypeOf (#511)
Diffstat (limited to 'test/hacker.spec.ts')
| -rw-r--r-- | test/hacker.spec.ts | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/hacker.spec.ts b/test/hacker.spec.ts index 28971c12..7dcb5f67 100644 --- a/test/hacker.spec.ts +++ b/test/hacker.spec.ts @@ -118,7 +118,7 @@ describe('name', () => { it('should return a random abbreviation from array', () => { const abbreviation = faker.hacker.abbreviation(); - expect(typeof abbreviation).toBe('string'); + expect(abbreviation).toBeTypeOf('string'); expect(abbreviation.length).greaterThan(0); expect(faker.definitions.hacker.abbreviation).toContain(abbreviation); }); @@ -132,7 +132,7 @@ describe('name', () => { it('should return a random adjective from array', () => { const adjective = faker.hacker.adjective(); - expect(typeof adjective).toBe('string'); + expect(adjective).toBeTypeOf('string'); expect(adjective.length).greaterThan(0); expect(faker.definitions.hacker.adjective).toContain(adjective); }); @@ -146,7 +146,7 @@ describe('name', () => { it('should return a random noun from array', () => { const noun = faker.hacker.noun(); - expect(typeof noun).toBe('string'); + expect(noun).toBeTypeOf('string'); expect(noun.length).greaterThan(0); expect(faker.definitions.hacker.noun).toContain(noun); }); @@ -160,7 +160,7 @@ describe('name', () => { it('should return a random verb from array', () => { const verb = faker.hacker.verb(); - expect(typeof verb).toBe('string'); + expect(verb).toBeTypeOf('string'); expect(verb.length).greaterThan(0); expect(faker.definitions.hacker.verb).toContain(verb); }); @@ -174,7 +174,7 @@ describe('name', () => { it('should return a random ingverb from array', () => { const ingverb = faker.hacker.ingverb(); - expect(typeof ingverb).toBe('string'); + expect(ingverb).toBeTypeOf('string'); expect(ingverb.length).greaterThan(0); expect(faker.definitions.hacker.ingverb).toContain(ingverb); }); @@ -188,7 +188,7 @@ describe('name', () => { it('should return a random phrase from array', () => { const phrase = faker.hacker.phrase(); - expect(typeof phrase).toBe('string'); + expect(phrase).toBeTypeOf('string'); expect(phrase.length).greaterThan(0); }); }); |
