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
import test from 'ava';
import got from 'got';
import unroll from 'unroll';
import URLFactory from '../../helpers/lib/URLFactory';
unroll.use(test);
test('This test will correctly fail', async t =>
{
await got('http://127.0.0.1:8000/account/')
.then(response =>
{
console.log(response.body);
t.is(response.statusCode, 400)
});
});
unroll('This test for #description should also fail but does not', async function (t, testArgs)
{
await got('http://127.0.0.1:8000' + testArgs.input) // This is the exact same URL
.then(response =>
{
console.log(response.body); // Exact same console output
t.is(response.statusCode, testArgs.moo); // Exact same assertion
})
},
[
["description", "input", "moo"],
["/account", URLFactory.accountEndPoint(), 400]
]);
The first test using Ava directly fails as expected, and passes as expected if I change 400 to 200.
The test using Unroll always shows as passed, even though I am purposefully attempting to make it fail.
Initially I was using supertest, and I thought perhaps I had found a bug there, but I swapped out the library for got and can replicate the same behavior, so I'm wondering if maybe there is an issue with Unroll and the current version of Ava.
Thanks again for your hard work, and please let me know if you see anything I am missing.
The text was updated successfully, but these errors were encountered:
Thank you for the great module. I wish more JS frameworks had better support for this kind of testing natively.
I am trying out this module with some basic HTTP endpoint tests and running into some trouble:
Node: 6.10.0
OS: MacOS (Darwin) 10.12.3
Ava: 0.18.2
Got: 6.7.0
Unroll: 1.2.0
The first test using Ava directly fails as expected, and passes as expected if I change 400 to 200.
The test using Unroll always shows as passed, even though I am purposefully attempting to make it fail.
Initially I was using
supertest
, and I thought perhaps I had found a bug there, but I swapped out the library forgot
and can replicate the same behavior, so I'm wondering if maybe there is an issue with Unroll and the current version of Ava.Thanks again for your hard work, and please let me know if you see anything I am missing.
The text was updated successfully, but these errors were encountered: