Skip to content

Instantly share code, notes, and snippets.

@kianaditya
Created June 18, 2020 08:56
Show Gist options
  • Save kianaditya/9636740a6f96462fd74e64d8bcabb415 to your computer and use it in GitHub Desktop.
Save kianaditya/9636740a6f96462fd74e64d8bcabb415 to your computer and use it in GitHub Desktop.
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