diff --git a/package.json b/package.json index 2708e0e61..6506046a7 100644 --- a/package.json +++ b/package.json @@ -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", @@ -67,5 +67,10 @@ "tap-dot": "^1.0.0", "tape": "^4.0.0", "xo": "*" + }, + "xo": { + "ignores": [ + "test/es2015.js" + ] } } diff --git a/readme.md b/readme.md index bfd82916e..9717223a4 100644 --- a/readme.md +++ b/readme.md @@ -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 => { @@ -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" } } ``` diff --git a/test/test.js b/test/test.js index e6765d1f0..4d742ae58 100644 --- a/test/test.js +++ b/test/test.js @@ -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); }); });