Skip to content

Commit

Permalink
test: fix coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
OpportunityLiu committed Jun 20, 2022
1 parent 2c6bfad commit 63cfb04
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions test/server/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: ['<rootDir>/'],
setupFilesAfterEnv: ['./setup-jest.js'],
// moduleNameMapper: {
// '^shared/.*$': '<rootDir>/src/$0',
// '^server/.*$': '<rootDir>/src/$0',
// },
rootDir: path.resolve(__dirname, '../..'),
roots: ['<rootDir>/'],
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: {
'^#(.*)$': '<rootDir>/../../dist/$1.js',
'^#(.*)$': '<rootDir>/dist/$1.js',
},
};

Expand Down

0 comments on commit 63cfb04

Please sign in to comment.