Skip to content

Commit 1a41aa5

Browse files
committed
CCM-11889: unit tests
1 parent 4095435 commit 1a41aa5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+9393
-2364
lines changed

data-migration/user-transfer/jest.config.ts renamed to data-migration/user-identifiers/jest.config.ts

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
*/
55

66
import type { Config } from 'jest';
7-
import { pathsToModuleNameMapper } from 'ts-jest';
8-
import { compilerOptions } from './tsconfig.json';
97

108
const config: Config = {
119
preset: 'ts-jest',
@@ -31,14 +29,9 @@ const config: Config = {
3129
},
3230
},
3331

34-
collectCoverageFrom: ['src/**/*.ts*'],
32+
collectCoverageFrom: ['src/**/*.ts*', 'src/*.ts*'],
3533

36-
coveragePathIgnorePatterns: ['migrate-cli.ts', 'plan-cli.ts', 'types.ts'],
37-
38-
// Set the absolute path for imports
39-
moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths, {
40-
prefix: '<rootDir>/',
41-
}),
34+
coveragePathIgnorePatterns: ['.snap'],
4235

4336
// Use this configuration option to add custom reporters to Jest
4437
reporters: [
@@ -57,6 +50,11 @@ const config: Config = {
5750
testEnvironment: 'node',
5851

5952
testPathIgnorePatterns: ['/node_modules/', '/tests/'],
53+
54+
// Set the path for imports
55+
moduleNameMapper: {
56+
'^@/(.*)': '<rootDir>/$1',
57+
},
6058
};
6159

6260
export default config;

0 commit comments

Comments
 (0)