Skip to content

Instantly share code, notes, and snippets.

@mulatinho
Created November 4, 2017 21:21
Show Gist options
  • Save mulatinho/325e575a45037e8bcf51fc58f719109c to your computer and use it in GitHub Desktop.
Save mulatinho/325e575a45037e8bcf51fc58f719109c to your computer and use it in GitHub Desktop.
test-chai.js
var app = require('../main.js');
var request = require('supertest');
var chai = require("chai");
describe('A list of tests', function() {
describe('#GET /questions', function() {
it('should get a list of questions', function(done) {
request(app) .get('/questions')
.end(function(err, res) {
expect(res.statusCode).to.equal(200);
expect(res.body).to.be.an('array');
expect(res.body).to.be.empty;
done();
});
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment