aboutsummaryrefslogtreecommitdiff
path: root/test/git.spec.ts
diff options
context:
space:
mode:
authorShinigami <[email protected]>2022-02-20 18:32:49 +0100
committerGitHub <[email protected]>2022-02-20 18:32:49 +0100
commitbfa7946f7ef5c025c2af9165191ffced4a7dde9d (patch)
tree5c3e0e619b529be10da0be5b1f83d71437c9436f /test/git.spec.ts
parent2448aab2fca711ef18857e27690f94440b517d84 (diff)
downloadfaker-bfa7946f7ef5c025c2af9165191ffced4a7dde9d.tar.xz
faker-bfa7946f7ef5c025c2af9165191ffced4a7dde9d.zip
test: use toBeTypeOf (#511)
Diffstat (limited to 'test/git.spec.ts')
-rw-r--r--test/git.spec.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/git.spec.ts b/test/git.spec.ts
index 23548ef1..b43498d3 100644
--- a/test/git.spec.ts
+++ b/test/git.spec.ts
@@ -108,7 +108,7 @@ describe('git', () => {
const branch = faker.git.branch();
expect(branch).toBeTruthy();
- expect(typeof branch).toBe('string');
+ expect(branch).toBeTypeOf('string');
expect(branch).satisfy(validator.isSlug);
});
});
@@ -118,7 +118,7 @@ describe('git', () => {
const commitEntry = faker.git.commitEntry();
expect(commitEntry).toBeTruthy();
- expect(typeof commitEntry).toBe('string');
+ expect(commitEntry).toBeTypeOf('string');
const parts = commitEntry.split(/\r?\n/);
@@ -146,7 +146,7 @@ describe('git', () => {
const commitMessage = faker.git.commitMessage();
expect(commitMessage).toBeTruthy();
- expect(typeof commitMessage).toBe('string');
+ expect(commitMessage).toBeTypeOf('string');
const parts = commitMessage.split(' ');
expect(parts.length).greaterThanOrEqual(3);
@@ -158,7 +158,7 @@ describe('git', () => {
const commitSha = faker.git.commitSha();
expect(commitSha).toBeTruthy();
- expect(typeof commitSha).toBe('string');
+ expect(commitSha).toBeTypeOf('string');
expect(commitSha).satisfy(validator.isHexadecimal);
expect(commitSha).toHaveLength(40);
});
@@ -169,7 +169,7 @@ describe('git', () => {
const shortSha = faker.git.shortSha();
expect(shortSha).toBeTruthy();
- expect(typeof shortSha).toBe('string');
+ expect(shortSha).toBeTypeOf('string');
expect(shortSha).satisfy(validator.isHexadecimal);
expect(shortSha).toHaveLength(7);
});