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 ed26bd7 commit 7a60b54
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"node": ">=0.10.0"
},
"scripts": {
"test": "node test.js"
"test": "ava"
},
"files": [
"index.js"
Expand All @@ -34,6 +34,6 @@
"binary-extensions": "^1.0.0"
},
"devDependencies": {
"ava": "0.0.4"
"ava": "*"
}
}
18 changes: 8 additions & 10 deletions test.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
'use strict';
var test = require('ava');
var isBinaryPath = require('./');
import test from 'ava';
import m from './';

test(function (t) {
t.assert(isBinaryPath('unicorn.png'));
t.assert(isBinaryPath('unicorn.zip'));
t.assert(isBinaryPath('unicorn.ZIP'));
t.assert(!isBinaryPath('unicornzip'));
t.assert(!isBinaryPath('unicorn.txt'));
t.end();
test(t => {
t.true(m('unicorn.png'));
t.true(m('unicorn.zip'));
t.true(m('unicorn.ZIP'));
t.false(m('unicornzip'));
t.false(m('unicorn.txt'));
});

0 comments on commit 7a60b54

Please sign in to comment.