Registry / testing / babel-helper-transform-fixture-test-runner

babel-helper-transform-fixture-test-runner

JSON →
library6.26.2jsnpmunverified

Internal Babel helper that provides a test runner for fixture-based tests within Babel's own monorepo. It is used in conjunction with babel-helper-fixtures to run transformation tests on a set of input/output fixtures. Current stable version is 6.26.2 (an older Babel 6 era package). Release cadence is tied to Babel releases. This package is not intended for direct use by consumers; it's an internal dependency for Babel development. Key differentiator: it is specific to Babel's test infrastructure and not a general-purpose testing utility.

npm install babel-helper-transform-fixture-test-runner
INSTALL
IMPORT
SIG · BABEL-HELPER-TRANS
B
babel-helper-transform-fixture-test-runner
testingjavascriptv6.26.2
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
import run from 'babel-helper-transform-fixture-test-runner'
const run = require('babel-helper-transform-fixture-test-runner')
This is an internal Babel package. In Babel 6 era, it likely uses CommonJS. For Babel 7+, this package may be scoped under @babel/helper-transform-fixture-test-runner.
run
const run = require('babel-helper-transform-fixture-test-runner')
import run from 'babel-helper-transform-fixture-test-runner'
Since this package is typically used in Node.js test environments, CommonJS require is common. ESM imports may not work due to lack of ESM exports.
run
const { run } = require('babel-helper-transform-fixture-test-runner')
const run = require('babel-helper-transform-fixture-test-runner').run
If the package exports a named function 'run', destructuring is preferred. The exact export pattern may vary by version.

Demonstrates how to use the runner with a fixture directory and custom babel options.

const run = require('babel-helper-transform-fixture-test-runner'); const path = require('path'); const testDir = path.join(__dirname, 'fixtures'); const opts = { presets: ['@babel/preset-env'], // Additional babel options }; run(testDir, opts, function (err, results) { if (err) { console.error('Test failed:', err); } else { results.forEach(result => { console.log(result.title, result.pass ? 'PASS' : 'FAIL'); }); } });
Debug
Known issues
deprecatedThis package is part of Babel 6 and may not receive updates. Babel 7+ uses @babel/helper-transform-fixture-test-runner.
fix
Upgrade to the scoped @babel/helper-transform-fixture-test-runner package if using Babel 7+.
affects: 6.26.2
breakingIn Babel 8, the package may be removed or renamed. Do not rely on this package for production code.
fix
Use Babel's official testing utilities like @babel/helper-plugin-test-runner instead.
affects: >=8.0.0
gotchaThe package expects fixtures in a specific directory structure. Incorrect fixture layout will cause silent failures or no tests run.
fix
Follow Babel's fixture convention: input.js and output.js in a test case folder. Refer to Babel's own test fixtures for examples.
affects: >=6.0.0
Errors
Common errors & fixes
Error: Cannot find module 'babel-helper-transform-fixture-test-runner'
Package not installed or missing from node_modules. This package is an internal Babel dependency and not published to npm for general use.
fix
Install from npm: npm install babel-helper-transform-fixture-test-runner --save-dev, or switch to the scoped @babel/helper-transform-fixture-test-runner if using Babel 7+.
TypeError: run is not a function
Attempting to use the package without proper import or require. The exported value may be an object with a 'run' method.
fix
Use: const { run } = require('babel-helper-transform-fixture-test-runner');
Upgrade
Version history
6.26.2latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
19 hits · last 30 days
node
14
OpenAI (training)
1
Resources
babel-helper-transform-fixture-test-runner — npm install babel-helper-transform-fixture-test-runner · libregistry