-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
0.34.3 doens't work with Uint8Array and TextEncoder #4043
Copy link
Copy link
Open
Labels
p2-edge-caseBug, but has workaround or limited in scope (priority)Bug, but has workaround or limited in scope (priority)
Description
Describe the bug
The test works in 0.34.2, but doesn't work in 0.34.3
Reproduction
test('toEqual', () => {
expect([1]).toEqual([1]); // OK
expect(new TextEncoder().encode('a')).toEqual(new TextEncoder().encode('a')); // OK
expect(Uint8Array.from([97])).toEqual(new TextEncoder().encode('a')); // FAIL: AssertionError: expected Uint8Array[ 97 ] to deeply equal Uint8Array[ 97 ]
});System Info
node: v20.5.0, macOSUsed Package Manager
npm
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
p2-edge-caseBug, but has workaround or limited in scope (priority)Bug, but has workaround or limited in scope (priority)