Skip to content

Instantly share code, notes, and snippets.

@haidarafif0809
Created April 17, 2018 11:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save haidarafif0809/0941834f94b4167c24bf3cad844715f9 to your computer and use it in GitHub Desktop.
Save haidarafif0809/0941834f94b4167c24bf3cad844715f9 to your computer and use it in GitHub Desktop.
Test Express Mocha Chai Chai-http
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