Skip to content

Instantly share code, notes, and snippets.

@Nxt3
Created July 9, 2018 20:52
Show Gist options
  • Save Nxt3/bec2dfca859909414fb65e26aed6a9e4 to your computer and use it in GitHub Desktop.
Save Nxt3/bec2dfca859909414fb65e26aed6a9e4 to your computer and use it in GitHub Desktop.
module.exports = {
globals: {
'ts-jest': {
tsConfigFile: 'tsconfig.spec.json'
},
__TRANSFORM_HTML__: true
},
preset: 'jest-preset-angular',
roots: ['<rootDir>/apps/', '<rootDir>/libs/'],
transform: {
'^.+\\.(ts|js|html)$': '<rootDir>/node_modules/jest-preset-angular/preprocessor.js'
},
transformIgnorePatterns: ['<rootDir>/node_modules/(?!lodash-es/.*)'],
collectCoverage: false,
collectCoverageFrom: [
'**/*.{ts}',
'!**/node_modules/**',
'!**/vendor/**',
'!scripts/**',
'!**/test.ts',
'!**/index.ts'
],
moduleNameMapper: {
'^@my-app/(.*)': '<rootDir>/libs/$1/src'
},
setupTestFrameworkScriptFile: './scripts/setup-jest.ts'
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment