Description
tape-run is a headless test runner for tape tests written in JavaScript. It runs your tests in a browser and returns exit code 0 or 1, so you can use it as your npm test script. TAP results stream in from the browser as the tests run. Electron is the default browser, and you can choose chrome, firefox, ie, phantom or safari when they are installed. You can pipe a rollup bundle straight into it from the command line, or use the webpack-tape-run plugin with a webpack configuration for your tests. A JavaScript API lets you run tests from code, with options for how long to wait for results, a port for opening the tests in your own browser, a static directory to serve, and a keepOpen flag that leaves the browser open for debugging. There are also options for Node integration and the Electron sandbox, and a basedir option for requiring Node modules in node mode. The README includes a usage example with a test file saved as test/test.js.…
Highlights
- Runs tape tests in a headless browser
- Exit code for npm test scripts
- Electron default with Chrome and Firefox options
- Works with rollup and webpack
- JavaScript API with debugging options
Ratings & Reviews
No ratings yet
Be the first to rate Tape Run.
People also visit
Tape Run FAQ
What is tape-run?
A headless test runner for tape tests that runs them in a browser and returns a pass or fail exit code.
How do I run it from npm?
Use it as your npm test script. Write your tests with tape, bundle them with browserify, rollup or webpack, and pipe the bundle into tape-run.
Which browser does it use?
Electron by default. You can choose chrome, firefox, ie, phantom or safari if they are installed.
Can I debug failing tests?
Yes. The keepOpen option leaves the browser open after the tests run.
Can I run it from JavaScript?
Yes. The run function takes options for wait time, port, static directory, browser and more.
What are the best Tape Run alternatives?
Popular alternatives to Tape Run include Browser Run, Testcafe and Playwright. See all Tape Run alternatives








