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>
17 lines
565 B
JavaScript
17 lines
565 B
JavaScript
/**
|
|
* 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',
|
|
};
|