mirror of
https://github.com/docker/awesome-compose.git
synced 2025-04-26 10:43:35 +02:00
react-express-mysql: split backend code
Signed-off-by: Jérémie Drouet <jeremie.drouet@gmail.com>
This commit is contained in:
parent
2ef179e53b
commit
75aa52524c
7 changed files with 130 additions and 126 deletions
49
react-express-mysql/backend/test/sample.js
vendored
49
react-express-mysql/backend/test/sample.js
vendored
|
@ -1,32 +1,33 @@
|
|||
const app = require('../index');
|
||||
const chai = require("chai");
|
||||
const chaiHttp = require("chai-http");
|
||||
|
||||
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 /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();
|
||||
});
|
||||
});
|
||||
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();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue