-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test.cb.beforeEach and test.cb.afterEach throw error even though t.end()
is defined
#180
Comments
t.end()
is defined
Could you share an example? |
test.cb.beforeEach(t => {
setTimeout(() => t.end(), 3000);
}); |
@niftylettuce this works for me: import test from 'ava'
test.cb.beforeEach(t => {
setTimeout(() => t.end(), 3000);
});
test(t => t.pass()) If you're using |
I know that, but it still didn't work. Also try putting the test in a
separate file and requiring it. That's what triggered it for me.
…On Oct 1, 2017 11:57 AM, "Mark Wubben" ***@***.***> wrote:
@niftylettuce <https://github.com/niftylettuce> this works for me:
import test from 'ava'
test.cb.beforeEach(t => {
setTimeout(() => t.end(), 3000);
});
test(t => t.pass())
If you're using test.cb() with a test, as well as in the before and after
hooks, you still have to call t.end() inside the test itself.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#180 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAf7hTIxpedvSeqepRnhBznc_uc55WhUks5sn7ZhgaJpZM4PpzIb>
.
|
@niftylettuce could you provide a full example of where this is failing for you? |
@niftylettuce were you referring to the example you posted at avajs/ava#1687 (comment)? This seems to be similar to #119. I think |
Even though I explicitly call
t.end()
in mybeforeEach
andafterEach
functions, this error is still thrown:The text was updated successfully, but these errors were encountered: