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
Broken conversion from tape tests #123
Comments
Thanks for reporting this. It seems we are not handling that corner case correctly. : / Let me know if you have any suggestions on how to fix this. And if you have time, then PRs are more than welcome. :) |
I think that the problem is that Jest and Tape work in two completely different ways. Probably a conversion from Tape to Jest requires more than just a methods conversions. test('', done => {
const PLAN = 2
let i = 0
let touch = () => { if (++i >= PLAN) done() }
expect.assertions(PLAN)
setTimeout(() => {
expect(true).toBeTruthy()
touch()
}, 4000)
setTimeout(() => {
expect(true).toBeTruthy()
touch()
}, 3000)
}) |
Hi guys,
I think that the conversion from tape doesn't work, because the tape
t.plan(N)
function andexpect.assertions(N)
have different behaviours; Moreover, Jest has this different way to work with callbacks https://jestjs.io/docs/en/asynchronous.html#callbacksTAPE TEST
TAPE LOG
JEST TEST (CONVERTED)
JEST LOG
The text was updated successfully, but these errors were encountered: