Created
January 16, 2020 03:40
-
-
Save Roms1383/3a00334fcc70b10ecdadd97a8f4fbf05 to your computer and use it in GitHub Desktop.
Medium - Dynamically matching files in Jest - using CLI regexp
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
module.exports = { | |
roots: [ | |
'<rootDir>/dist/', | |
], | |
testEnvironment: 'node', | |
transform: { | |
'^.+\\.(ts|tsx)$': 'ts-jest', | |
}, | |
} |
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
{ | |
... | |
"scripts": { | |
... | |
"build": "rm -rf dist && tsc", | |
"prespec": "yarn build", | |
"spec": "yarn jest \"^(.*\/)*(.*\\.)*(spec)\\.js$\" --passWithNoTests", | |
"preintegration": "yarn build", | |
"integration": "yarn jest \"^(.*\/)*(.*\\.)*(test)\\.js$\" --passWithNoTests", | |
"pretest": "yarn build", | |
"test": "yarn jest --passWithNoTests" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment