test: wire jest harness for QA gate (S1-f)
Add jest + ts-jest to the NestJS backend with an app.service smoke spec that exercises Nest DI. `npm test` is the documented command the QA gate runs. Trace: SRS §6 gate, NFR-8. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
16
backend/jest.config.js
Normal file
16
backend/jest.config.js
Normal file
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* Jest config for the UlHub backend (NestJS).
|
||||
* ts-jest transpiles the TypeScript sources; decorators/metadata are honored via tsconfig.
|
||||
* Specs live next to sources as *.spec.ts (unit) — e2e would go under test/ with a separate config.
|
||||
*/
|
||||
module.exports = {
|
||||
moduleFileExtensions: ['js', 'json', 'ts'],
|
||||
rootDir: 'src',
|
||||
testRegex: '.*\\.spec\\.ts$',
|
||||
transform: {
|
||||
'^.+\\.ts$': ['ts-jest', { tsconfig: '<rootDir>/../tsconfig.json' }],
|
||||
},
|
||||
collectCoverageFrom: ['**/*.(t|j)s'],
|
||||
coverageDirectory: '../coverage',
|
||||
testEnvironment: 'node',
|
||||
};
|
||||
Reference in New Issue
Block a user