Created
November 23, 2016 05:47
-
-
Save sombriks/49bf54a715be7d53c9b89ed6b6da679d to your computer and use it in GitHub Desktop.
well it works. mocha + chai + chai-http
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
/* | |
"devDependencies": { | |
"chai": "^3.5.0", | |
"mocha": "^3.1.2", | |
"chai-http": "^3.0.0" | |
} | |
*/ | |
"use strict" | |
let chai = require('chai'); | |
let chaiHttp = require('chai-http'); | |
let server = require('../src/main'); | |
let should = chai.should(); | |
chai.use(chaiHttp); | |
describe("Basic tests", () => { | |
it("it should get the app status", (done) => { | |
chai.request(server.app) | |
.get('/status') | |
.end((err, res) => { | |
res.should.have.status(200); | |
res.text.should.be.eql("ONLINE"); | |
done(); | |
}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment