feat: [back] basic testing libraries installed
This commit is contained in:
11
back-express/README.md
Normal file
11
back-express/README.md
Normal file
@@ -0,0 +1,11 @@
|
||||
## Testing
|
||||
|
||||
### Mocha
|
||||
|
||||
### Chai
|
||||
|
||||
Assertion
|
||||
|
||||
### Sinon
|
||||
|
||||
Mocks
|
||||
1179
back-express/package-lock.json
generated
1179
back-express/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -11,11 +11,17 @@
|
||||
"license": "ISC",
|
||||
"description": "",
|
||||
"devDependencies": {
|
||||
"@types/chai": "^5.2.2",
|
||||
"@types/cors": "^2.8.17",
|
||||
"@types/express": "^5.0.0",
|
||||
"@types/mocha": "^10.0.10",
|
||||
"@types/node": "^22.7.4",
|
||||
"@types/sinon": "^17.0.4",
|
||||
"chai": "^5.2.1",
|
||||
"express": "^4.21.0",
|
||||
"mocha": "^11.7.1",
|
||||
"nodemon": "^3.1.7",
|
||||
"sinon": "^21.0.0",
|
||||
"ts-node": "^10.9.2",
|
||||
"typescript": "^5.6.2"
|
||||
},
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
import UsersService from "../users.service";
|
||||
import { Role, User } from "../users.types";
|
||||
|
||||
const user_list_mock: User[] = [
|
||||
{
|
||||
id: 1,
|
||||
username: "test",
|
||||
password: "asdf",
|
||||
roles: [Role.Admin],
|
||||
picture: "",
|
||||
created_at: "now",
|
||||
},
|
||||
];
|
||||
|
||||
describe("users service", () => {
|
||||
const usersService = new UsersService();
|
||||
it("returns all users", () => {});
|
||||
});
|
||||
Reference in New Issue
Block a user