- Add validated LOG_MODE configuration and route trace-aware diagnostics through debug. - Select debug mode in shared test setup while preserving DEBUG namespace control. - Add logger/config regression coverage and document runtime configuration.
21 lines
771 B
JavaScript
21 lines
771 B
JavaScript
/** @type {import('jest').Config} */
|
|
module.exports = {
|
|
moduleFileExtensions: ['js', 'json', 'ts'],
|
|
rootDir: '.',
|
|
testRegex: 'test/.*\\.spec\\.ts$',
|
|
transform: {
|
|
'^.+\\.ts$': ['ts-jest', { tsconfig: 'test/tsconfig.json' }],
|
|
},
|
|
setupFiles: ['<rootDir>/test/logging.setup.js'],
|
|
moduleNameMapper: {
|
|
'^jsdom$': '<rootDir>/test/__mocks__/jsdom.ts',
|
|
'^playwright$': '<rootDir>/test/__mocks__/playwright.ts',
|
|
'^@mozilla/readability$': '<rootDir>/test/__mocks__/readability.ts',
|
|
},
|
|
testEnvironment: 'node',
|
|
// Each suite builds a full Nest app in beforeAll. That takes well under a
|
|
// second on an idle machine, but several seconds when every suite starts at
|
|
// once on a busy CI runner, past Jest's default 5 s.
|
|
testTimeout: 30_000,
|
|
};
|