-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
vitest 1.6.0 and axios tests fails with error DataCloneError: function transformRequest
#5848
Comments
Had the same error Today |
Looks like axios's vitest/packages/utils/src/error.ts Line 48 in c238072
Like here: vitest/packages/utils/src/error.ts Line 40 in c238072
|
@sheremet-va If the change is to apply the same logic at line 48 than line 40, I guess I can do it. |
The change is applying the logic and adding a test. |
Do you have an idea on how to write a such test? |
Just call the function with previously failing parameters here:
|
Hello, I took a look unfortunately I don't know how to write a test the fails with the current implementation. |
Also faced this issue testing axios clients. Submitted a PR fixing that - #5884 |
Hello @sheremet-va , Do you know if it is planned to releas a 1.6.1 or a 1.7.0 version with this fix? |
The next release is 2.0. If this bug is bothering you, you can stay at 1.5.3. |
Describe the bug
Hello,
After upgrading to
vitest
1.6.0 we started to face some weird errors during test execution.Same tests was working and are still working fine with version 1.5.0.
It looks that the issue occurs when an AxiosError is thrown by the test.
When this error occurs vitest stops executing other test but doesn't really report a failure.
The vitest worker looks to crash and to not execute other tests in the same file.
The error looks like the following:
Reproduction
Here is a stackblitz allowing to reproduce the bug: https://stackblitz.com/edit/vitest-dev-vitest-henjam?file=test%2Fsuite.test.ts
System Info
Used Package Manager
npm
Validations
The text was updated successfully, but these errors were encountered: