You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test('throws(promise) returns promise',t=>{varresult=t.throws(Promise.reject(newError('foo')));t.is(typeofresult.then,'function');});// I've expected this should work, but it fails, since message is undefinedtest('rejection reason is foo',t=>{consterror=t.throws(Promise.reject(newError('foo')));t.is(error.message,'foo');});
Environment
Node.js v7.1.0
darwin 16.1.0
npm 3.10.9
ava 0.17.0
The text was updated successfully, but these errors were encountered:
Description
According to the documentation for
.throws(function|promise, [error, [message]])
the method should return the rejection reason of promise, instead the promise itself is returned.Test Source
Environment
Node.js v7.1.0
darwin 16.1.0
npm 3.10.9
ava 0.17.0
The text was updated successfully, but these errors were encountered: