Skip to content

Instantly share code, notes, and snippets.

@42tg
Created October 16, 2018 14:03
Show Gist options
  • Save 42tg/e525cb9a198e96f18cdc229e699e4dc5 to your computer and use it in GitHub Desktop.
Save 42tg/e525cb9a198e96f18cdc229e699e4dc5 to your computer and use it in GitHub Desktop.
Basic Jest config
module.exports = function (wallaby) {
return {
files: [
{ pattern: 'node_modules/babel-polyfill/dist/polyfill.js', instrument: false },
'config/jest.setup.js',
'src/**/*.js',
'package.json',
'!**/*[sS]pec.js',
'!**/*[tT]est.js',
'!node_modules/**/*.*',
],
tests: [
'!node_modules/**/*.*',
'**/*[sS]pec.js',
'**/*[tT]est.js',
],
env: {
type: 'node',
runner: 'node',
},
debug: true,
testFramework: 'jest',
compilers: {
'**/*.js': wallaby.compilers.babel(),
},
setup: function (wallaby) {
let jestConfig = require('./package.json').jest;
// for example:
// jestConfig.globals = { "__DEV__": true };
wallaby.testFramework.configure(jestConfig);
},
};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment