Created
April 17, 2018 11:43
-
-
Save haidarafif0809/0941834f94b4167c24bf3cad844715f9 to your computer and use it in GitHub Desktop.
Test Express 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
const chai = require('chai'); | |
const chaiHttp = require('chai-http'); | |
const app = require('../app') | |
const expect = chai.expect | |
chai.use(chaiHttp) | |
describe('App', () => { | |
it('should run without any problem', () => { | |
chai.request(app) | |
.get('/') | |
.end( (err, res) => { | |
expect(res).to.have.status(200) | |
}) | |
}) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment