Created
June 18, 2020 08:56
-
-
Save kianaditya/9636740a6f96462fd74e64d8bcabb415 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 request = require('supertest') | |
const app = require('../src/app') | |
const expect = require('chai').expect | |
describe('POST /login endpoint', async () => { | |
it('POST /login endpoint', async () => { | |
try { | |
return await request(app) | |
.post('/login') | |
.send({ email: '[email protected]', password: 'password' }) | |
.then((response) => { | |
expect(response.statusCode).to.equal(200) | |
}) | |
} catch (error) { | |
console.log(error) | |
} | |
}) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment