Unhandled Rejection Error on Test Case After Updating from Vue Test Utils v1 to v2 #2139
Unanswered
SCreutzburg
asked this question in
Q&A
Replies: 1 comment 3 replies
-
|
Hi @SCreutzburg, |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I recently updated my test framework from Vue Test Utils v1 to Vue Test Utils v2. After the update, I am facing an issue with one of my test cases. Here is the test case:
Since the upgrade, I am getting this error:
Vitest caught 1 unhandled error during the test run. This might cause false positive tests. Resolve unhandled errors to make sure your tests are not affected. Unhandled Rejection Error: Test errorThe error is triggered when the
calculatefunction is called by theclickevent. Thecalculatefunction has a catch block that throws an error (i.e.,throw(e)). This is causing the test error, but this only started happening after the upgrade to Vue Test Utils v2. Thethrow(e)in the catch block is essential for our application and cannot be removed.Here is the
calculatefunction for reference:I would appreciate any guidance on how to resolve this issue. Thank you.
Beta Was this translation helpful? Give feedback.
All reactions