Created
November 4, 2017 21:21
-
-
Save mulatinho/325e575a45037e8bcf51fc58f719109c to your computer and use it in GitHub Desktop.
test-chai.js
This file contains hidden or 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
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