Created
November 5, 2017 00:01
-
-
Save erik-haartmans/74d592d5f5335150e224112b2f13885c to your computer and use it in GitHub Desktop.
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
const chai = require('chai'); | |
chai.should(); | |
const request = require('supertest')('http://api.icndb.com/jokes'); | |
describe('chuck norris query parameters test suite', () => { | |
it('should be able to use query parameters', async () => { | |
const response = await request.get('/random') | |
.query({ | |
firstName: 'John', | |
lastName: 'Doe' | |
}); | |
response.statusCode.should.equal(200, 'response status should equal 200'); | |
console.log(response.body.value.joke); | |
}) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment