Added integration tests for players #7
Merged
GitHub Actions / Jest Tests
succeeded
Aug 9, 2024 in 0s
19 passed, 0 failed and 0 skipped
✅ server/reports/jest-junit.xml
19 tests were completed in 5s with 19 passed, 0 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
controllers/tests/teams.test.ts | 4✅ | 237ms | ||
models/tests/picks.test.ts | 5✅ | 5s | ||
models/tests/players.test.ts | 5✅ | 5s | ||
models/tests/teams.test.ts | 5✅ | 5s |
✅ controllers/tests/teams.test.ts
Teams Controller › deleteTeam
✅ should delete a team when a valid team id is provided
✅ should return a message if the team does not exist
✅ should return a 500 error with a specific error message if something goes wrong
✅ should return a 500 error with a generic error message if something that isn't an error goes wrong
✅ models/tests/picks.test.ts
Picks Model › deletePick
✅ should delete a pick
Picks Model › getAllPicks
✅ should get all picks
Picks Model › getPicksByGrandPrixId
✅ should get all the picks associated with a particular grand prix
Picks Model › postPick
✅ should create a pick
Picks Model › putPick
✅ should update a pick
✅ models/tests/players.test.ts
Players Model › deletePlayer
✅ should delete a player
Players Model › getAllPlayers
✅ should get all players
Players Model › getPlayerById
✅ should get a player by id
Players Model › postPlayer
✅ should create a player
Players Model › putPlayer
✅ should update a player
✅ models/tests/teams.test.ts
Teams Model › deleteTeam
✅ should delete a team
Teams Model › getAllTeams
✅ should get all teams
Teams Model › getTeamById
✅ should get a team by id
Teams Model › postTeam
✅ should create a team
Teams Model › putTeam
✅ should update a team
Loading