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

Fix Jest missing webpack config #781

Merged
merged 1 commit into from
Jul 31, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 );