FYI for Vitest 4 users #7951
theogravity
started this conversation in
General
Replies: 1 comment
-
|
I think we could have an option to keep function expressions if they're passed to a .mockImplementation() call. |
Beta Was this translation helpful? Give feedback.
0 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.
Uh oh!
There was an error while loading. Please reload this page.
-
Vitest 4 recently came out, and it's now extremely sensitive to when you can use arrow functions vs normal functions. The linter rule
complexity.useArrowFunctionneeds to be turned tooffwhen using Vite 4 so it does not convert the normal functions to arrow functions.https://main.vitest.dev/guide/migration.html#spyon-and-fn-support-constructors
Not sure what an appropriate fix for this would be...
Beta Was this translation helpful? Give feedback.
All reactions