Created
June 26, 2020 12:50
-
-
Save velotiotech/c313836ffc1c85033d86efce556a9f70 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
var supertest = require('supertest'); //require supertest | |
const request = supertest('https://reqres.in/'); //supertest hits the HTTP server (your app) | |
/* | |
This piece of code is for getting the authorization token after login to your app. | |
const token; | |
test("Login to the application", function(){ | |
return request.post(``).then((response)=>{ | |
token = response.body.token //to save the login token for further requests | |
}) | |
}); | |
*/ | |
module.exports = | |
{ | |
request | |
//, token -- export if token is generated | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment