-
Notifications
You must be signed in to change notification settings - Fork 0
/
test2.test.js
34 lines (29 loc) · 1.2 KB
/
test2.test.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
const { users } = require("./index");
describe("users - attribute", () => {
it("should have monica as first user with complete attribute", async () => {
let attribute = Object.keys(users[0]);
expect(users[0].name).toBe("Monica");
expect(attribute.length).toBe(8);
expect(attribute).toContain("name");
expect(attribute).toContain("gender");
expect(attribute).toContain("age");
expect(attribute).toContain("email");
expect(attribute).toContain("favoriteColor");
expect(attribute).toContain("isHavePet");
expect(attribute).toContain("education")
expect(attribute).toContain("favoriteRestaurant")
});
it("should have wendy as second user with complete attribute", async () => {
let attribute = Object.keys(users[1]);
expect(users[1].name).toBe("Wendy");
expect(attribute.length).toBe(8);
expect(attribute).toContain("name");
expect(attribute).toContain("gender");
expect(attribute).toContain("age");
expect(attribute).toContain("email");
expect(attribute).toContain("favoriteColor");
expect(attribute).toContain("isHavePet");
expect(attribute).toContain("education")
expect(attribute).toContain("favoriteRestaurant")
});
});