Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jahed Ahmed
committed
Jan 25, 2022
1 parent
aa11a81
commit 0d413ae
Showing
7 changed files
with
46 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,6 @@ | ||
module.exports = { | ||
preset: 'ts-jest', | ||
testMatch: [ | ||
'<rootDir>/test/*.spec.ts', | ||
'<rootDir>/test/iac-unit-tests/*.spec.ts', | ||
'<rootDir>/packages/**/test/**/*.spec.ts', | ||
'<rootDir>/test/jest/unit/**/*.spec.ts', | ||
'<rootDir>/test/jest/acceptance/**/*.spec.ts', | ||
], | ||
modulePathIgnorePatterns: [ | ||
'<rootDir>/test/.*fixtures/*', | ||
'<rootDir>/packages/.+/test/.*fixtures/*', | ||
'<rootDir>/test/acceptance/*', | ||
'<rootDir>/test/acceptance/workspaces/*', // to avoid `jest-haste-map: Haste module naming collision` errors | ||
], | ||
}; | ||
const { createJestConfig } = require('./test/createJestConfig'); | ||
|
||
module.exports = createJestConfig({ | ||
displayName: 'snyk', | ||
projects: ['<rootDir>', '<rootDir>/packages/*'], | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
const { createJestConfig } = require('../../test/createJestConfig'); | ||
|
||
module.exports = createJestConfig({ displayName: '@snyk/cli-alert' }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
module.exports = { | ||
preset: 'ts-jest', | ||
}; | ||
const { createJestConfig } = require('../../test/createJestConfig'); | ||
|
||
module.exports = createJestConfig({ displayName: '@snyk/fix' }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,3 @@ | ||
module.exports = { | ||
preset: 'ts-jest', | ||
testMatch: [ | ||
'<rootDir>/test/**/*.spec.ts', | ||
'<rootDir>\\test\\**\\*.spec.ts', // for Windows | ||
], | ||
}; | ||
const { createJestConfig } = require('../../test/createJestConfig'); | ||
|
||
module.exports = createJestConfig({ displayName: '@snyk/protect' }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
const createJestConfig = (config) => { | ||
const ignorePatterns = [ | ||
'/node_modules/', | ||
'/dist/', | ||
'/test/fixtures/', | ||
'<rootDir>/test/acceptance/workspaces/', | ||
'<rootDir>/test/tap/', | ||
'<rootDir>/packages/', | ||
'<rootDir>/pysrc/', | ||
]; | ||
|
||
return { | ||
preset: 'ts-jest', | ||
testRegex: '\\.spec\\.ts$', | ||
testPathIgnorePatterns: [...ignorePatterns], | ||
modulePathIgnorePatterns: [...ignorePatterns], | ||
coveragePathIgnorePatterns: [...ignorePatterns], | ||
transformIgnorePatterns: [...ignorePatterns], | ||
...config, | ||
}; | ||
}; | ||
|
||
module.exports = { | ||
createJestConfig, | ||
}; |