-
Notifications
You must be signed in to change notification settings - Fork 309
Commit
transformIgnorePatterns
value (#1162)
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { json as runWithJson } from '../run-jest'; | ||
|
||
const DIR = 'ng-lib-import'; | ||
|
||
test(`successfully runs the tests inside ${DIR} with isolatedModules: false`, () => { | ||
const { json } = runWithJson(DIR); | ||
|
||
expect(json.success).toBe(true); | ||
}); | ||
|
||
test(`successfully runs the tests inside ${DIR} with isolatedModules: true`, () => { | ||
const { json } = runWithJson(DIR, ['-c=jest-isolated.config.js']); | ||
|
||
expect(json.success).toBe(true); | ||
}); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { MyLibService } from 'my-lib'; | ||
|
||
test('should pass', () => { | ||
expect(new MyLibService()).toBeInstanceOf(MyLibService); | ||
}); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
const baseCfg = require('./jest.config'); | ||
|
||
module.exports = { | ||
...baseCfg, | ||
globals: { | ||
'ts-jest': { | ||
isolatedModules: true, | ||
}, | ||
}, | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
module.exports = { | ||
moduleFileExtensions: ['ts', 'html', 'js', 'json', 'mjs'], | ||
resolver: '<rootDir>/../../build/resolvers/ng-jest-resolver.js', | ||
setupFilesAfterEnv: ['<rootDir>/../../setup-jest.js'], | ||
testEnvironment: 'jsdom', | ||
transform: { | ||
'^.+\\.(ts|js|mjs|html)$': '<rootDir>/../../build/index.js', | ||
}, | ||
transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)'], | ||
}; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.