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
window.URL.createObjectURL Blob ERR_INVALID_ARG_TYPE #1377
Comments
I see that jsdom doesn't support Although Node 16.7 supports it, so you can add to your import { Blob } from 'buffer'
globalThis.Blob = Blob // use Node.js Blob instead of Jsdom's Blob However it may create more issue with jsdom API's 👀 |
Oh my... thanks for surfacing that issue. Well, after almost saying this wasn't working several times, I cleaned up what I was doing, and with the latest vitest and your global Blob suggestion, everything works!! The only issue I had with the Blob is I was polyfilling I love working with the vitest community!! Thanks! |
@mckelveygreg would you mind sharing how you exactly solved it? i'm unable to assign
|
This surfaced for me when switching from vitest 0.22 -> 0.24 (and vite 2 -> 3). Fixed with @sheremet-va suggestion. |
Alternatively, |
Describe the bug
In one of my dependencies,
window.window.URL.createObjectURL
is being called, but it does not like theBlob
argument that is being passed in, saying it isn't aBlob
Reproduction
My repro shows the same code in the lib that is failing. It is failing on 0.12.6, before #1340 was released, and on latest.
System Info
Used Package Manager
yarn
Validations
The text was updated successfully, but these errors were encountered: