Skip to content

Commit 0c319da

Browse files
committed
added json checks for home & info endpoint tests
1 parent f731d3b commit 0c319da

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

test/v1-all.test.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,15 @@ test("It should return 404 page", () => {
2020
test("It should return home info", () => {
2121
return request(app).get("/v1").then(response => {
2222
expect(response.statusCode).toBe(200)
23+
expect(response.text).toContain("SpaceX-API")
2324
})
2425
})
2526

2627
// Info Tests
2728
test("It should return company info", () => {
2829
return request(app).get("/v1/info").then(response => {
2930
expect(response.statusCode).toBe(200)
31+
expect(response.text).toContain("Elon Musk")
3032
})
3133
})
3234

0 commit comments

Comments
 (0)