Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
Fix Jest missing webpack config (#781)
Browse files Browse the repository at this point in the history
  • Loading branch information
Aljullu authored Jul 31, 2019
1 parent 80d10be commit cdad10d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/js/jest.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,8 @@
"node_modules/(?!(simple-html-tokenizer)/)"
],
"preset": "@wordpress/jest-preset-default",
"transform": {
"^.+\\.js$": "<rootDir>/tests/js/jestPreprocess.js"
},
"verbose": true
}
5 changes: 5 additions & 0 deletions tests/js/jestPreprocess.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
const babelOptions = {
presets: [ '@wordpress/babel-preset-default' ],
};

module.exports = require( 'babel-jest' ).createTransformer( babelOptions );

0 comments on commit cdad10d

Please sign in to comment.