A test runner that combines Babel and Tape to transpile and execute test suites containing ESNext/Harmony features. Current stable version is 3.0.0, supporting Babel 7. It serves as a drop-in replacement for Tape's bundled runner, reading Babel configuration from .babelrc. The package follows a semver-aligned versioning scheme with major versions tied to Babel major releases (v1 for Babel 5, v2 for Babel 6, v3 for Babel 7). Key differentiator is the seamless integration of Babel transpilation with Tape's simple test framework, enabling modern JavaScript syntax in tests without manual setup.
npm install babel-tape-runnerVerified import paths — ran on the pinned version, not inferred.
Demonstrates setting up babel-tape-runner with Babel 7 and tape, including installation, .babelrc configuration, writing a test with ESNext arrow functions, and running it.
Ensure babel-tape-runner version matches your Babel version. Update .babelrc and Babel presets accordingly.
Use babel-tape-runner only from command line or npm scripts. Use tape directly for test API.
Consider migrating to modern alternatives like '@babel/register' with tape or use a test framework with built-in transpilation (e.g., jest, mocha with @babel/register).
Always quote glob patterns in npm scripts: "test": "babel-tape-runner \"lib/**/__tests__/*-test.js\""
Run 'npm install --save-dev @babel/preset-env' and ensure .babelrc contains '{"presets": ["@babel/preset-env"]}'.Install and configure @babel/preset-env in .babelrc and use babel-tape-runner v3 (for Babel 7).
Install globally with 'npm install -g babel-tape-runner' or use npx: 'npx babel-tape-runner test.js'. Alternatively, add to package.json scripts.