Created
November 4, 2017 21:22
-
-
Save mulatinho/0a75ab1bb596383ef817ca3a862857b0 to your computer and use it in GitHub Desktop.
test-chai.js
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
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