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

Improve assert.async Function to Handle Type Checking #1721

Closed
zixinyin opened this issue Jul 25, 2023 · 0 comments
Closed

Improve assert.async Function to Handle Type Checking #1721

zixinyin opened this issue Jul 25, 2023 · 0 comments

Comments

@zixinyin
Copy link
Contributor

  • QUnit version: 2.19.4
  • Which environment are you using?: browser
  • **How are you running QUnit? **: Karma

What are you trying to do?

Currently, using a string instead of a number as an argument for assert.async in QUnit causes the test page to hang indefinitely without providing diagnostic messages. To enhance this function and improve diagnostics, we propose adding type checking.

Code that reproduces the problem:

QUnit.test("Test type checking for async", function(assert) {
    assert.async("the test should fail");
});

What did you expect to happen?

While running the code above, the test should fail and deliver proper diagnostics message.

What actually happened?

The test hang indefinitely.

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

Successfully merging a pull request may close this issue.

2 participants