Created
          October 16, 2018 14:03 
        
      - 
      
- 
        Save 42tg/e525cb9a198e96f18cdc229e699e4dc5 to your computer and use it in GitHub Desktop. 
    Basic Jest config
  
        
  
    
      This file contains hidden or 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 = 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