Skip to content

Commit

Permalink
add tests for phonenumbers
Browse files Browse the repository at this point in the history
  • Loading branch information
onedebos committed Jul 17, 2020
1 parent 10a8b37 commit 4b19a72
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ describe("getPerson()", () => {
expect(person).toHaveProperty("age", person.age);
expect(person).toHaveProperty("email", person.email);
expect(person).toHaveProperty("bank", person.bank);
expect(person).toHaveProperty("phoneNumber", person.phoneNumber);
});

it("returns a person between the ages of min and max passed in", () => {
Expand Down Expand Up @@ -101,3 +102,11 @@ describe("getNameList", () => {
expect(nameList.length).toBe(20);
});
});

describe("getPhoneNumber", () => {
it("returns a Nigerian phoneNumber", () => {
const phoneNumber = naijaFaker.getPhoneNumber();
expect(typeof phoneNumber).toBe("string");
expect(phoneNumber.length).toBe(17);
});
});

0 comments on commit 4b19a72

Please sign in to comment.