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 a97dc1c commit 3ee5bc0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 16 deletions.
4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -14,7 +14,7 @@
"node": ">=0.10.0"
},
"scripts": {
"test": "node test.js"
"test": "ava"
},
"files": [
"index.js",
Expand Down Expand Up @@ -47,6 +47,6 @@
"unique-random-array": "^1.0.0"
},
"devDependencies": {
"ava": "0.0.4"
"ava": "*"
}
}
26 changes: 12 additions & 14 deletions test.js
@@ -1,16 +1,14 @@
'use strict';
var test = require('ava');
var dogNames = require('./');
import test from 'ava';
import m from './';

test(function (t) {
t.assert(dogNames.female.length > 0);
t.assert(dogNames.male.length > 0);
t.assert(dogNames.all.length > 0);
t.assert(dogNames.femaleRandom());
t.assert(dogNames.maleRandom());
t.assert(dogNames.allRandom());
t.assert(dogNames.allRandom() !== dogNames.allRandom());
t.assert(dogNames.all[0] === 'Bella');
t.assert(dogNames.all[1] === 'Max');
t.end();
test(t => {
t.true(m.female.length > 0);
t.true(m.male.length > 0);
t.true(m.all.length > 0);
t.ok(m.femaleRandom());
t.ok(m.maleRandom());
t.ok(m.allRandom());
t.not(m.allRandom(), m.allRandom());
t.is(m.all[0], 'Bella');
t.is(m.all[1], 'Max');
});

0 comments on commit 3ee5bc0

Please sign in to comment.