We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Checking the uint8.buffer instance fails when checking with the global ArrayBuffer class.
uint8.buffer
ArrayBuffer
/** * @vitest-environment jsdom */ describe(() => { it('arraybuffer', async () => { const uint8 = new Uint8Array([1]); expect(uint8.constructor.name).toBe('Uint8Array'); expect(uint8 instanceof Uint8Array).toBeTruthy(); expect(ArrayBuffer.isView(uint8)).toBeTruthy(); expect(uint8.buffer instanceof ArrayBuffer).toBeTruthy(); }); });
When using @vitest-environment jsdom.
@vitest-environment jsdom
Using node works well, tho.
node
This scenario should work in the browser as seen here:
Using:
"vitest@0.28.4"
"jsdom@22.1.0"
System: OS: macOS 13.5 CPU: (10) arm64 Apple M1 Pro Memory: 1.18 GB / 32.00 GB Shell: 5.9 - /bin/zsh Binaries: Node: 16.18.1 - ~/.nvm/versions/node/v16.18.1/bin/node Yarn: 1.19.0 - ~/Workspace/platform/client-applications/node_modules/.bin/yarn npm: 8.19.2 - ~/.nvm/versions/node/v16.18.1/bin/npm Browsers: Chrome: 115.0.5790.170 Chrome Canary: 118.0.5953.0 Edge: 115.0.1901.200 Firefox: 116.0.2 Safari: 16.6
yarn
The text was updated successfully, but these errors were encountered:
Please, let me know if this is a JSDOM specific issue, if so, I can report it there.
Sorry, something went wrong.
Thanks @sheremet-va!
Successfully merging a pull request may close this issue.
Describe the bug
Checking the
uint8.buffer
instance fails when checking with the globalArrayBuffer
class.When using
@vitest-environment jsdom
.Using
node
works well, tho.This scenario should work in the browser as seen here:
Using:
"vitest@0.28.4"
"jsdom@22.1.0"
Reproduction
System Info
Used Package Manager
yarn
Validations
The text was updated successfully, but these errors were encountered: