Install and configure Jest test runner (WCTAS-4)
Adds jest, ts-jest, ts-node, and @types/jest as devDependencies and creates jest.config.ts with the ts-jest preset. `npm test` exits 0 with no test files. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
2a43c12382
commit
b8c9417961
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
## Project Status
|
## Project Status
|
||||||
|
|
||||||
Node.js/TypeScript project initialized with npm and tsconfig. Source code implementation is pending.
|
Node.js/TypeScript project initialized with npm, tsconfig, and Jest (ts-jest). Source code implementation is pending.
|
||||||
|
|
||||||
## Build Commands
|
## Build Commands
|
||||||
|
|
||||||
@ -33,6 +33,7 @@ word-counter-api/
|
|||||||
├── src/ # TypeScript source files (to be added)
|
├── src/ # TypeScript source files (to be added)
|
||||||
│ └── server.ts # Entry point
|
│ └── server.ts # Entry point
|
||||||
├── dist/ # Compiled JavaScript output (gitignored)
|
├── dist/ # Compiled JavaScript output (gitignored)
|
||||||
|
├── jest.config.ts # Jest config (ts-jest preset, passWithNoTests)
|
||||||
├── package.json # npm manifest with build/start/dev/test scripts
|
├── package.json # npm manifest with build/start/dev/test scripts
|
||||||
├── tsconfig.json # TypeScript config (CommonJS, strict mode)
|
├── tsconfig.json # TypeScript config (CommonJS, strict mode)
|
||||||
├── .gitignore
|
├── .gitignore
|
||||||
|
|||||||
9
jest.config.ts
Normal file
9
jest.config.ts
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
import type { Config } from 'jest';
|
||||||
|
|
||||||
|
const config: Config = {
|
||||||
|
preset: 'ts-jest',
|
||||||
|
testEnvironment: 'node',
|
||||||
|
passWithNoTests: true,
|
||||||
|
};
|
||||||
|
|
||||||
|
export default config;
|
||||||
7027
package-lock.json
generated
7027
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -17,7 +17,11 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/express": "^4.17.0",
|
"@types/express": "^4.17.0",
|
||||||
|
"@types/jest": "^29.5.14",
|
||||||
"@types/node": "^22.0.0",
|
"@types/node": "^22.0.0",
|
||||||
|
"jest": "^29.7.0",
|
||||||
|
"ts-jest": "^29.4.11",
|
||||||
|
"ts-node": "^10.9.2",
|
||||||
"tsx": "^4.0.0",
|
"tsx": "^4.0.0",
|
||||||
"typescript": "^5.0.0"
|
"typescript": "^5.0.0"
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user