Skip to content
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

timeout isn't ideal #1

Open
markwylde opened this issue Aug 3, 2022 · 1 comment
Open

timeout isn't ideal #1

markwylde opened this issue Aug 3, 2022 · 1 comment

Comments

@markwylde
Copy link
Owner

The node test runtime comes with it's own timeout.

But unfortunately I can't find a way of letting assertPlan know once the timeout has occurred, or even what the timeout specified was.

So in the end we kinda have to do something like this. IE specify a timeout on the actual test, and one slightly lower on the assertPlan.

test('test 2 assertions will timeout', { timeout: 2000 }, async t => {
  const assert = assertPlan(2, { timeout: 1500});

  assert.strictEqual(1, 1);

  await assert.wait();
});

Not sure the best solution.

@markwylde
Copy link
Owner Author

Hopefully there is a hook/feature I'm not aware of we can use:
nodejs/node#44125

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant