Last active
April 2, 2020 23:11
-
-
Save justgrumpy/bbc6bf0ccc27fbc404b8e28894ebcff2 to your computer and use it in GitHub Desktop.
Jest configuration with Stryker considerations
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
const { jestConfig } = require('@salesforce/sfdx-lwc-jest/config'); | |
jestConfig.testPathIgnorePatterns = [...jestConfig.testPathIgnorePatterns, "<rootDir>/.stryker-tmp/"]; | |
module.exports = { | |
...jestConfig, | |
collectCoverageFrom: [ | |
"force-app/main/default/lwc/**/*.js", | |
"!**/node_modules/**" | |
], | |
moduleNameMapper: { | |
'^@salesforce/apex$': '<rootDir>/force-app/test/jest-mocks/apex', | |
'^lightning/navigation$': | |
'<rootDir>/force-app/test/jest-mocks/lightning/navigation', | |
'^lightning/platformShowToastEvent$': | |
'<rootDir>/force-app/test/jest-mocks/lightning/platformShowToastEvent', | |
'^lightning/uiRecordApi$': | |
'<rootDir>/force-app/test/jest-mocks/lightning/uiRecordApi', | |
'^c/(.*)': '<rootDir>/force-app/main/default/lwc/$1/$1.js' | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment