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

Test with timeout and missing assert.async() call never times out #1705

Closed
patricklx opened this issue Sep 27, 2022 · 1 comment · Fixed by #1739
Closed

Test with timeout and missing assert.async() call never times out #1705

patricklx opened this issue Sep 27, 2022 · 1 comment · Fixed by #1739
Assignees
Labels
Component: Core For module, test, hooks, and reporters. Type: Bug Something isn't working right. Type: Regression

Comments

@patricklx
Copy link

patricklx commented Sep 27, 2022

related issue: emberjs/ember-qunit#476

Tell us about your runtime:

  • QUnit version: 2.19.1
  • Which environment are you using? (e.g., browser, Node): browser
  • How are you running QUnit? (e.g., QUnit CLI, Grunt, Karma, manually in browser): browser, jsfiddle

Code that reproduces the problem:

QUnit.test( "demo", async assert => {
	assert.timeout( 10 );
	const done = assert.async();
	assert.true( true );
} );

https://jsfiddle.net/fasjpd49/

@patricklx patricklx changed the title calling assert.async and not resolving it via done never times out calling assert.async inside an async function and not resolving it via done never times out Sep 27, 2022
@Krinkle Krinkle added Type: Bug Something isn't working right. Type: Regression Component: Core For module, test, hooks, and reporters. labels Oct 19, 2022
@Krinkle
Copy link
Member

Krinkle commented Oct 19, 2022

Thanks for reporting. I've confirmed the issue, and it appears to be a regression from an earlier version. https://codepen.io/Krinkle/pen/ExLzzVv

Times out as expected QUnit 2.14, 2.15, 2.16
Never-ending QUnit 2.17, 2.18, 2.19

@Krinkle Krinkle changed the title calling assert.async inside an async function and not resolving it via done never times out Failing test with timeout and missing assert.async() call never times out Oct 23, 2022
@Krinkle Krinkle changed the title Failing test with timeout and missing assert.async() call never times out Test with timeout and missing assert.async() call never times out Oct 23, 2022
@Krinkle Krinkle self-assigned this Oct 23, 2022
Krinkle added a commit to Krinkle/qunit that referenced this issue Feb 8, 2024
Follows-up 163c9bc (qunitjs#1642),
which changed an internalRecover() to internalStart(), whereas
internalStart will (correctly) not resume if there are other pauses
still remaining.

Change this back to internalRecover().

Fixes qunitjs#1705.
Krinkle added a commit that referenced this issue Feb 9, 2024
Follows-up 163c9bc (#1642),
which changed an internalRecover() to internalStart(), whereas
internalStart will (correctly) not resume if there are other pauses
still remaining.

Change this back to internalRecover().

Fixes #1705.
Closes #1739.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Core For module, test, hooks, and reporters. Type: Bug Something isn't working right. Type: Regression
Development

Successfully merging a pull request may close this issue.

2 participants