You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
681 B
JavaScript
34 lines
681 B
JavaScript
const chai = require("chai");
|
|
const chaiHttp = require("chai-http");
|
|
|
|
const app = require("../src/server");
|
|
|
|
chai.use(chaiHttp);
|
|
chai.should();
|
|
|
|
describe("API /healthz", () => {
|
|
it("it should return 200", done => {
|
|
chai
|
|
.request(app)
|
|
.get("/healthz")
|
|
.end((err, res) => {
|
|
res.should.have.status(200);
|
|
done();
|
|
});
|
|
});
|
|
});
|
|
|
|
describe("API /", () => {
|
|
it("it should return Welcome message", done => {
|
|
chai
|
|
.request(app)
|
|
.get("/")
|
|
.end((err, res) => {
|
|
res.should.have.status(200);
|
|
res.should.to.be.html;
|
|
res.text.should.be.equal("Hello Docker World\n");
|
|
done();
|
|
});
|
|
});
|
|
});
|