diff --git a/test/server/jest.config.js b/test/server/jest.config.js index 64028896..51b624f8 100644 --- a/test/server/jest.config.js +++ b/test/server/jest.config.js @@ -6,23 +6,18 @@ const __dirname = path.dirname(url.fileURLToPath(import.meta.url)); /** @typedef {import('ts-jest')} */ /** @type {import('@jest/types').Config.InitialOptions} */ const config = { - // moduleFileExtensions: ['js', 'json', 'ts'], - // rootDir: path.resolve(__dirname, '../..'), - // roots: ['/'], - setupFilesAfterEnv: ['./setup-jest.js'], - // moduleNameMapper: { - // '^shared/.*$': '/src/$0', - // '^server/.*$': '/src/$0', - // }, + rootDir: path.resolve(__dirname, '../..'), + roots: ['/'], + setupFilesAfterEnv: [path.resolve(__dirname, './setup-jest.js')], testEnvironment: 'node', - testRegex: '(\\.test|\\.spec)\\.js$', + testRegex: 'test/server/.+(\\.test|\\.spec)\\.js$', transform: {}, collectCoverage: true, coverageProvider: 'v8', moduleNameMapper: { - '^#(.*)$': '/../../dist/$1.js', + '^#(.*)$': '/dist/$1.js', }, };