Skip to content

Commit

Permalink
fixed unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
phucd5 committed Nov 28, 2023
1 parent da9c0cd commit 740989c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion server/__tests__/controllers/authTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ describe("login", () => {

await login(req, res);

expect(res.statusCode).toBe(400);
expect(res.statusCode).toBe(500);
expect(res._getData()).toContain("Internal Server Error");
});
});
7 changes: 6 additions & 1 deletion server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"jest": "^29.7.0"
},
"scripts": {
"test": "node --experimental-vm-modules node_modules/.bin/jest",
"test": "node --experimental-vm-modules node_modules/.bin/jest ",
"build": "echo 'No build step required'",
"start": "node server.js"
},
Expand All @@ -38,6 +38,11 @@
"!**/__tests__/**",
"!**/coverage/lcov-report/**"
],
"coverageThreshold": {
"global": {
"statements": 90.50
}
},
"coverageDirectory": "coverage"
},
"keywords": [],
Expand Down

0 comments on commit 740989c

Please sign in to comment.