Skip to content

Commit

Permalink
update tests for latest AVA version
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Jan 1, 2016
1 parent 8265d04 commit 82a887c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"node": ">=0.10.0"
},
"scripts": {
"test": "xo && node test.js"
"test": "xo && ava"
},
"files": [
"index.js"
Expand Down Expand Up @@ -51,7 +51,7 @@
"ansi-regex": "^2.0.0"
},
"devDependencies": {
"ava": "0.0.4",
"ava": "*",
"xo": "*"
}
}
12 changes: 5 additions & 7 deletions test.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
'use strict';
var test = require('ava');
var hasAnsi = require('./');
import test from 'ava';
import m from './';

test(function (t) {
t.assert(hasAnsi('foo\u001b[4mcake\u001b[0m'));
t.assert(!hasAnsi('cake'));
t.end();
test(t => {
t.true(m('foo\u001b[4mcake\u001b[0m'));
t.false(m('cake'));
});

0 comments on commit 82a887c

Please sign in to comment.