You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a component that will throw an error if two attrs arent passed in (x and y) and the component is clicked on.
There are three tests:
Ensure no errors if both attrs passed in and component is clicked ✅
Ensure an error is throw when only one attr is passed in and component is clicked (uses native JS and tests fails) ❌
Ensure an error is throw when only one attr is passed in and component is clicked (uses jquery and test passes) ✅
Here is where things go wrong:
// Qunit throws
try {
block.call(currentTest.testEnvironment); <====== This call doesnt trigger an error when it uses native JS. But FUN FACT: if you highlight this line at a breakpoint, it will log an error (???)
} catch (e) {
actual = e;
}
...
if (actual) { <==== `actual` needs to be set otherwise it wont catch the error and the test will fail.
However, if you still feel something is missing feel free to open a new issue, and let's work on a more up to date repro of the problem 💪 thank you!!! ❤️ 🥳
This twiddle reproduces the issue.
TLDR
There is a component that will throw an error if two attrs arent passed in (
x
andy
) and the component is clicked on.There are three tests:
Here is where things go wrong:
Originally posted by @nlfurniss in #310 (comment)
The text was updated successfully, but these errors were encountered: