Skip to content

Commit

Permalink
test: Fix Wallaby & Jest
Browse files Browse the repository at this point in the history
  • Loading branch information
felixrieseberg committed Mar 31, 2019
1 parent 7d19ad9 commit 83a7d23
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 3 additions & 1 deletion jest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
"bail": true,
"resetMocks": true,
"resetModules": true,
"setupTestFrameworkScriptFile": "<rootDir>/tests/setup.js",
"setupFilesAfterEnv": [
"<rootDir>/tests/setup.js"
],
"moduleFileExtensions": [
"js",
"jsx",
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
"update-electron-app": "^1.3.0"
},
"devDependencies": {
"@babel/core": "^7.4.0",
"@electron-forge/cli": "^6.0.0-beta.34",
"@electron-forge/maker-deb": "^6.0.0-beta.34",
"@electron-forge/maker-rpm": "^6.0.0-beta.34",
Expand Down
6 changes: 2 additions & 4 deletions wallaby.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,10 @@ module.exports = (wallaby) => ({

testFramework: 'jest',

// Enable mock hoisting as same as ts-jest does
// (https://github.com/kulshekhar/ts-jest#supports-automatic-of-jestmock-calls)
preprocessors: {
'**/*.js?(x)': (file) => require('babel-core').transform(
'**/*.js?(x)': file => require('@babel/core').transform(
file.content,
{ sourceMaps: true, filename: file.path, presets: ['babel-preset-jest'] })
{sourceMap: true, filename: file.path, presets: [require('babel-preset-jest')]})
},

workers: {
Expand Down

0 comments on commit 83a7d23

Please sign in to comment.