Created
March 13, 2018 19:58
-
-
Save taylor-lindores-reeves/ec9e38fb06cb0624e7312dede4666bd2 to your computer and use it in GitHub Desktop.
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 request = require('supertest'); | |
let server | |
describe('Test the root path', () => { | |
beforeEach(function () { | |
delete require.cache[require.resolve('../server')]; | |
server = require('../server'); | |
}); | |
afterEach((done) => { | |
server.close(done); | |
}); | |
test('It should response the GET method', (done) => { | |
request(server).get('/').then((response) => { | |
expect(response.statusCode).toBe(200); | |
done(); | |
}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment