-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
fix: incorrect error message for non-awaited expect.element()
#8954
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
fix: incorrect error message for non-awaited expect.element()
#8954
Conversation
✅ Deploy Preview for vitest-dev ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
The error is correct, just the message is wrong. |
expect.element() errorexpect.element() error message
|
I don't see how this fixes the message. Please, add a test somewhere in |
Determining the error message is based on a flag that's attached to the expect function reference (either What happened is that the flagging of
Added. Took me some time to figure it out... |
expect.element() error messageexpect.element()
| return result | ||
| }, processTimeoutOptions(options)) | ||
|
|
||
| chai.util.flag(expectElement, '_poll.element', true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, new here :)
How does this ensures the right message?
I see, the |
Description
Resolves #8953
Flagging the callback happened inside the callback itself, which runs after the check whether it's
pollorelement, so I flagged it outside the callbackI want to add some tests. Saw that there are tests for
poll-no-awaited, but I'm assuming thatexpect.elementtests shouldn't be there and I wasn't sure how to test it. Would be glad to get some help here