Description
When using t.throws() with a promise that rejects with a string instead of an Error object, the assertion fails.
import test from 'ava';
async function fn(): Promise<any> {
return Promise.reject('foo');
}
test(async t => {
t.throws(fn(), 'foo');
});

When using Promise.reject(new Error('foo'));, it works as expected.
It's due to these lines. I have no idea why it overrides the err reference with a function. I looked into core-assert and it doesn't seem like it works with passing in a function as the expected parameter. But might be missing something here.
Environment
Node.js v4.2.1
darwin 15.3.0