Skip to content

Instantly share code, notes, and snippets.

@agm1984
Last active Jul 10, 2020
Embed
What would you like to do?
Demonstration of `.jest.config.js` for `vue-jest` and `jest`
module.exports = {
testRegex: 'resources/js/.*.spec.js$',
moduleFileExtensions: [
'js',
'json',
'vue',
],
transform: {
'^.+\\.vue$': 'vue-jest',
'^.+\\.js$': 'babel-jest',
},
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/resources/$1',
'^~/(.*)$': '<rootDir>/resources/js/$1',
},
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment