Skip to content

Commit

Permalink
Merge pull request #121 from KOSASIH/deepsource-transform-728294e3
Browse files Browse the repository at this point in the history
style: format code with Autopep8, Black, ClangFormat, dotnet-format, Go fmt, Gofumpt, Google Java Format, isort, Ktlint, PHP CS Fixer, Prettier, RuboCop, Ruff Formatter, Rustfmt, Scalafmt, StandardJS, StandardRB, swift-format and Yapf
  • Loading branch information
KOSASIH authored May 10, 2024
2 parents a08c088 + 4de04a0 commit e5c3546
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions test/integration/user.test.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// test/integration/user.test.js

const chai = require('chai');
const chaiHttp = require('chai-http');
const app = require('../app');
const chai = require('chai')
const chaiHttp = require('chai-http')
const app = require('../app')

const expect = chai.expect;
chai.use(chaiHttp);
const expect = chai.expect
chai.use(chaiHttp)

describe('User API Integration Tests', () => {
describe('POST /register', () => {
Expand All @@ -15,26 +15,26 @@ describe('User API Integration Tests', () => {
lastName: 'Doe',
email: '[email protected]',
password: 'password123'
});
})

expect(res).to.have.status(201);
expect(res.body).to.be.an('object');
expect(res.body).to.have.property('token');
expect(res.body.token).to.be.a('string');
});
});
expect(res).to.have.status(201)
expect(res.body).to.be.an('object')
expect(res.body).to.have.property('token')
expect(res.body.token).to.be.a('string')
})
})

describe('POST /login', () => {
it('should login a user and return a JWT', async () => {
const res = await chai.request(app).post('/login').send({
email: '[email protected]',
password: 'password123'
});
})

expect(res).to.have.status(200);
expect(res.body).to.be.an('object');
expect(res.body).to.have.property('token');
expect(res.body.token).to.be.a('string');
});
});
});
expect(res).to.have.status(200)
expect(res.body).to.be.an('object')
expect(res.body).to.have.property('token')
expect(res.body.token).to.be.a('string')
})
})
})

0 comments on commit e5c3546

Please sign in to comment.