Skip to content

Commit

Permalink
cleanup #23
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Sep 8, 2015
1 parent eb6343e commit 5da9ead
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 @@ -27,7 +27,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 @@ -72,5 +72,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 5da9ead

Please sign in to comment.