Shortened and detailed the test on "/" endpoint
This commit is contained in:
parent
b3b11616bf
commit
7689cb28a3
|
@ -52,11 +52,8 @@ describe("/login works as instended", async () => {
|
||||||
describe("GET / shows all of the endpoints", async () => {
|
describe("GET / shows all of the endpoints", async () => {
|
||||||
const res = await request(app).get("/");
|
const res = await request(app).get("/");
|
||||||
|
|
||||||
it("should be", async () => {
|
it("should have the endpoints in the `endpoints` property, as an array", async () => {
|
||||||
expect(res.body).toHaveProperty("endpoints");
|
expect(res.body).toHaveProperty("endpoints");
|
||||||
});
|
|
||||||
|
|
||||||
it("should be an array", () => {
|
|
||||||
expect(Array.isArray(res.body.endpoints)).toBeTrue();
|
expect(Array.isArray(res.body.endpoints)).toBeTrue();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue