generated from agiledev-students-fall2023/generic-project-repository
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3352748
commit 01dbc9f
Showing
3 changed files
with
29 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
const chai = require("chai"); | ||
const chaiHttp = require("chai-http"); | ||
const server = require("../app"); | ||
const expect = chai.expect; | ||
|
||
chai.use(chaiHttp); | ||
|
||
describe(" GET Endpoint for Home", () => { | ||
describe("/GET /home", () => { | ||
it("it should return a 200 status code", (done) => { | ||
chai | ||
.request(server) | ||
.get("/home") | ||
.end((err, res) => { | ||
expect(res).to.have.status(200); | ||
expect(res.body).to.be.a("object"); | ||
expect(res.body).to.have.property("id"); | ||
expect(res.body).to.have.property("name"); | ||
done(); | ||
}); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters