Skip to content

Commit

Permalink
feat: add Jest tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dulapahv committed Dec 28, 2024
1 parent 35066d1 commit c8b52f7
Show file tree
Hide file tree
Showing 6 changed files with 3,101 additions and 153 deletions.
15 changes: 15 additions & 0 deletions server/jest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import type { Config } from 'jest';

const config: Config = {
preset: 'ts-jest',
testEnvironment: 'node',
testMatch: ['**/*.test.ts'],
verbose: true,
forceExit: true,
clearMocks: true,
resetMocks: true,
restoreMocks: true,
detectOpenHandles: true,
};

export default config;
10 changes: 8 additions & 2 deletions server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
"dev": "nodemon src/index.ts",
"start": "nodemon src/index.ts",
"build": "rimraf dist && tsc",
"format:check": "prettier --check .",
"format:fix": "prettier --write ."
"test": "jest",
"test:watch": "jest --watch",
"format:check": "prettier . --c",
"format:fix": "prettier . --w"
},
"packageManager": "[email protected]",
"dependencies": {
Expand All @@ -16,10 +18,14 @@
},
"devDependencies": {
"@ianvs/prettier-plugin-sort-imports": "^4.4.0",
"@types/jest": "^29.5.14",
"@types/simple-peer": "^9.11.8",
"jest": "^29.7.0",
"nodemon": "^3.1.9",
"prettier": "^3.4.2",
"rimraf": "^6.0.1",
"socket.io-client": "^4.8.1",
"ts-jest": "^29.2.5",
"ts-node": "^10.9.2",
"typescript": "^5.7.2"
},
Expand Down
Loading

1 comment on commit c8b52f7

@vercel
Copy link

@vercel vercel bot commented on c8b52f7 Dec 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.