Skip to content

Commit

Permalink
cleanup #23
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Sep 6, 2015
1 parent 4e2dce3 commit 699f706
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 17 deletions.
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"node": ">=0.10.0"
},
"scripts": {
"test": "xo !es2015.js && xo es2015.js --esnext && node test/test.js | tap-dot"
"test": "xo && node test/test.js | tap-dot"
},
"files": [
"index.js",
Expand Down Expand Up @@ -67,5 +67,10 @@
"tap-dot": "^1.0.0",
"tape": "^4.0.0",
"xo": "*"
},
"xo": {
"ignores": [
"test/es2015.js"
]
}
}
19 changes: 5 additions & 14 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,9 @@ test(function (t) {

### ES2015 support

You can write your tests in ES2015:
AVA comes with builtin support for ES2015 through [Babel](https://babeljs.io).

Just write your tests in ES2015. No extra work needed.

```js
test(t => {
Expand All @@ -193,24 +195,13 @@ test(t => {
});
```

And run it in any node version.

```sh
$ ava
```

Also you can use your local `babel` or `babel-core` instead of built-in.

For example, package.json:
You can also use your own local Babel version:

```json
{
"devDependencies": {
"ava": "^0.1.0",
"babel": "^5.8.0"
},
"scripts": {
"test": "ava"
"babel-core": "^5.8.0"
}
}
```
Expand Down
4 changes: 2 additions & 2 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ test('ES2015 support', function (t) {
execFile('../cli.js', ['es2015.js'], {
cwd: __dirname
}, function (err, stdout) {
t.assert(!err, err);
t.assert(stdout.trim().length);
t.error(err);
t.true(stdout.trim().length > 0);
});
});

0 comments on commit 699f706

Please sign in to comment.