Registry / testing / webpack-babel-jest

webpack-babel-jest

JSON →
library1.0.4jsnpmunverified

A Jest preprocessor plugin that integrates Webpack and Babel for testing JavaScript files. Version 1.0.4 (latest) is deprecated in favor of modern Jest transform patterns. It works with old Jest configuration (scriptPreprocessor) and Babel-Jest, automatically ignoring CSS/SCSS/LESS imports. No active maintenance since 2016.

npm install webpack-babel-jest
INSTALL
IMPORT
SIG · WEBPACK-BABEL-JEST
W
webpack-babel-jest
testingjavascriptv1.0.4
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
Not imported; configured via package.json jest.scriptPreprocessor
import webpackBabelJest from 'webpack-babel-jest';
This is a preprocessor script, not a module you import directly.
scriptPreprocessor
jest.scriptPreprocessor = '<rootDir>/node_modules/webpack-babel-jest';
scriptPreprocessor: require('webpack-babel-jest')
Must be a string path, not a module reference.

Shows typical package.json configuration for using this preprocessor with Jest.

// package.json { "devDependencies": { "webpack-babel-jest": "*", "jest-cli": "*" }, "scripts": { "test": "jest" }, "jest": { "scriptPreprocessor": "<rootDir>/node_modules/webpack-babel-jest", "testFileExtensions": ["es6", "js"], "moduleFileExtensions": ["js", "json", "es6"] } }
Debug
Known issues
deprecatedThis package is unmaintained and relies on old Jest APIs.
fix
Use modern Jest transform: transform: { '^.+\\.js$': 'babel-jest' }
affects: *
breakingJest v20+ removed scriptPreprocessor; you must use transform instead.
fix
Remove scriptPreprocessor, use transform: { '^.+\\.js$': 'babel-jest' }
affects: >=20
Errors
Common errors & fixes
Could not find module 'webpack-babel-jest' from 'rootDir'
Incorrect path or module not installed in project root.
fix
Install locally: npm install --save-dev webpack-babel-jest; check node_modules path.
Cannot find module 'babel-jest'
babel-jest is a required peer dependency not installed.
fix
Install babel-jest: npm install --save-dev babel-jest
Upgrade
Version history
1.0.4latest on npm
Audit
Dependencies
babel-jestrequiredCore dependency for Babel transformation
Agent activity
11 hits · last 30 days
node
10
Resources
webpack-babel-jest — npm install webpack-babel-jest · libregistry