-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
[Bug]: jest-environment-jsdom webIDL validator issue in node 18 #14379
Comments
* Change everything to Uint8Array related to jestjs/jest#14379 * Work on failing type tests * Revert changes to custom matcher setup * Remove last BufferArrays from tests * Fix custom matcher type errors in vscode * Remove errant `.buffer` calls on Uint8Arrays * Encryption Pair should serialize Array Buffer and Uint8Array * Fix EncArrayBuffer encryption --------- Co-authored-by: Thomas Rittson <trittson@bitwarden.com>
It can be you are hitting #2549. Unfortunately I have no suggestions how exactly to make it work with JSDOM. Perhaps a custom test environment could help? For example, you could build on top of |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days. |
This issue was closed because it has been stalled for 30 days with no activity. Please open a new issue if the issue is still relevant, linking to this one. |
This issue was closed because it has been stalled for 30 days with no activity. Please open a new issue if the issue is still relevant, linking to this one. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Version
29.6.2
Steps to reproduce
npm ci
npm run test
ArrayBuffer
:Expected behavior
Tests should pass since parameter types match
Actual behavior
Test fails with
TypeError
Additional context
Working with JSDOM
The
testEnvironment-node
branch changes test environment to node and injects a simple JSDOM into global.Tests pass in this branch.
Working when using a
TypedArray
the
typed-array
branch still uses jsdom as a test environment, but converts usage in crypto fromArrayBuffer
toTypedArray
. I don't see why these types would be interpreted differently by the validator, but it appears that this is a reasonable workaround.Suggested JSDOM workaround for other v22 issues
It was suggested to override JSDOM to use the correct version for other improvements that haven't made their way in to
jest-environment-jsdom
yet, but I'd pegged the package to the current release and this issue persists. It must be due to some configuration happening injest-environment-jsdom
.Environment
The text was updated successfully, but these errors were encountered: