awesome-compose/samples/react-express-mysql/backend/test/sample.js
Anca Iordache 43f21f2d8d add react-express-mysql application sample
Signed-off-by: Anca Iordache <anca.iordache@docker.com>
2020-03-05 18:40:44 +01:00

33 lines
767 B
JavaScript
Executable File

const app = require('../index');
const chai = require('chai');
const chaiHttp = require('chai-http');
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();
});
});
});