Permalink
Browse files

chore(package): update ava to version 0.19.0 (#14)

* chore(package): update ava to version 0.19.0
* fix async tests
  • Loading branch information...
greenkeeper[bot] authored and gurpreetatwal committed Apr 5, 2017
1 parent e07c01e commit 529355b7b3a04481b3b7a9eb90e97abd025fcc64
Showing with 16 additions and 18 deletions.
  1. +1 −1 package.json
  2. +9 −11 test/lib/assert.js
  3. +6 −6 test/lib/observables.js
View
@@ -47,7 +47,7 @@
"power-assert-formatter": "^1.4.1"
},
"devDependencies": {
"ava": "^0.18.0",
"ava": "^0.19.0",
"call-signature": "0.0.2",
"eslint": "^3.7.1",
"eslint-config-smartcar": "^2.0.0",
View
@@ -311,16 +311,14 @@ test('.throws()', function(t) {
});
});
test('.throws() - Promises', function(t) {
t.notThrows(assert.throws(Promise.reject(new Error('foo'))));
t.throws(assert.throws(Promise.resolve()));
test('.throws() - Promises', async function(t) {
await t.notThrows(assert.throws(Promise.reject(new Error('foo'))));
await t.throws(assert.throws(Promise.resolve()));
});
test('.notThrows() - Promises', function(t) {
t.notThrows(assert.notThrows(Promise.resolve()));
t.throws(assert.notThrows(Promise.reject(new Error('foo'))));
test('.notThrows() - Promises', async function(t) {
await t.notThrows(assert.notThrows(Promise.resolve()));
await t.throws(assert.notThrows(Promise.reject(new Error('foo'))));
});
test('.throws() returns the thrown error', function(t) {
@@ -340,7 +338,7 @@ test('.throws() returns the rejection reason of promise', async function(t) {
t.is(actual, expected);
});
test('.throws(fn, str) checks that error.message === str', function(t) {
test('.throws(fn, str) checks that error.message === str', async function(t) {
const throwFoo = function() {
throw new Error('foo');
};
@@ -350,8 +348,8 @@ test('.throws(fn, str) checks that error.message === str', function(t) {
t.notThrows(function() { assert.throws(throwFoo, 'foo'); });
t.throws(function() { assert.throws(throwFoo, 'bar'); });
t.notThrows(assert.throws(rejectFoo, 'foo'));
t.throws(assert.throws(rejectFoo, 'bar'));
await t.notThrows(assert.throws(rejectFoo, 'foo'));
await t.throws(assert.throws(rejectFoo, 'bar'));
});
test('.throws should throw if passed a bad value', function(t) {
View
@@ -10,12 +10,12 @@ function throwingObservable() {
});
}
test('.throws()', function(t) {
t.notThrows(assert.throws(throwingObservable()));
t.throws(assert.throws(Observable.of(1, 2, 3)));
test('.throws()', async function(t) {
await t.notThrows(assert.throws(throwingObservable()));
await t.throws(assert.throws(Observable.of(1, 2, 3)));
});
test('.notThrows()', function(t) {
t.notThrows(assert.notThrows(Observable.of(1, 2, 3)));
t.throws(assert.notThrows(throwingObservable()));
test('.notThrows()', async function(t) {
await t.notThrows(assert.notThrows(Observable.of(1, 2, 3)));
await t.throws(assert.notThrows(throwingObservable()));
});

0 comments on commit 529355b

Please sign in to comment.