From bee87a229da31d4c102154608a3bc2e84a38e06e Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Fri, 10 May 2024 17:59:59 +0000 Subject: [PATCH] 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 This commit fixes the style issues introduced in d186341 according to the output from 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. Details: None --- test/user.test.js | 62 +++++++++++++++++++++++------------------------ 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/test/user.test.js b/test/user.test.js index c87a701ea..fea7bb830 100644 --- a/test/user.test.js +++ b/test/user.test.js @@ -1,12 +1,12 @@ // test/user.test.js -const chai = require('chai'); -const chaiHttp = require('chai-http'); -const app = require('../app'); -const User = require('../models/user'); +const chai = require('chai') +const chaiHttp = require('chai-http') +const app = require('../app') +const User = require('../models/user') -const expect = chai.expect; -chai.use(chaiHttp); +const expect = chai.expect +chai.use(chaiHttp) describe('User API', () => { describe('POST /register', () => { @@ -16,17 +16,17 @@ describe('User API', () => { lastName: 'Doe', email: 'john.doe@example.com', password: 'password123' - }); - - expect(res).to.have.status(201); - expect(res.body).to.be.an('object'); - expect(res.body.user).to.have.property('_id'); - expect(res.body.user).to.have.property('firstName', 'John'); - expect(res.body.user).to.have.property('lastName', 'Doe'); - expect(res.body.user).to.have.property('email', 'john.doe@example.com'); - expect(res.body.user).to.have.property('password', 'password123'); - }); - }); + }) + + expect(res).to.have.status(201) + expect(res.body).to.be.an('object') + expect(res.body.user).to.have.property('_id') + expect(res.body.user).to.have.property('firstName', 'John') + expect(res.body.user).to.have.property('lastName', 'Doe') + expect(res.body.user).to.have.property('email', 'john.doe@example.com') + expect(res.body.user).to.have.property('password', 'password123') + }) + }) describe('POST /login', () => { it('should login a user', async () => { @@ -35,22 +35,22 @@ describe('User API', () => { lastName: 'Doe', email: 'jane.doe@example.com', password: 'password123' - }); + }) - await user.save(); + await user.save() const res = await chai.request(app).post('/login').send({ email: 'jane.doe@example.com', password: 'password123' - }); - - expect(res).to.have.status(200); - expect(res.body).to.be.an('object'); - expect(res.body.user).to.have.property('_id'); - expect(res.body.user).to.have.property('firstName', 'Jane'); - expect(res.body.user).to.have.property('lastName', 'Doe'); - expect(res.body.user).to.have.property('email', 'jane.doe@example.com'); - expect(res.body.user).to.have.property('password', 'password123'); - }); - }); -}); + }) + + expect(res).to.have.status(200) + expect(res.body).to.be.an('object') + expect(res.body.user).to.have.property('_id') + expect(res.body.user).to.have.property('firstName', 'Jane') + expect(res.body.user).to.have.property('lastName', 'Doe') + expect(res.body.user).to.have.property('email', 'jane.doe@example.com') + expect(res.body.user).to.have.property('password', 'password123') + }) + }) +})