UNPKG

1.22 kBMarkdownView Raw
1[![build status](https://img.shields.io/travis/wavded/babel-tape-runner.svg?style=flat-square)](https://travis-ci.org/wavded/babel-tape-runner) [![npm package](https://img.shields.io/npm/v/babel-tape-runner.svg?style=flat-square)](https://www.npmjs.org/package/babel-tape-runner) [![dependency status](https://img.shields.io/david/wavded/babel-tape-runner.svg?style=flat-square)](https://david-dm.org/wavded/babel-tape-runner)
2
3```
4Using Babel 7: Use ^3.0.0
5Using Babel 6: Use ^2.0.0
6Using Babel 5: Use ^1.0.0
7```
8
9A test runner for tape that utilizes babel in order to run test suites that include ESNext/Harmony features.
10
11## install
12
13Install globally or locally (for npm scripts):
14
15```sh
16npm install babel-tape-runner [-g]
17```
18
19## usage
20
21Just run `babel-tape-runner` with the files to test (just like tape's bundled runner). Store configuration in a `.babelrc` file.
22
23```sh
24babel-tape-runner my-es-next-test.js
25
26babel-tape-runner lib/**/__tests__/*-test.js # or glob patterns
27```
28
29For example, use this in your `package.json` file so you can run `npm test` to execute your tests:
30```json
31{
32 "scripts": {
33 "test": "babel-tape-runner \"lib/**/__tests__/*-test.js\" | faucet"
34 },
35 ""
36}
37```
38
39## licence
40
41MIT