Skip to content
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

Can't compare two DataViews #3700

Closed
6 tasks done
demensky opened this issue Jun 28, 2023 · 1 comment · Fixed by #3703
Closed
6 tasks done

Can't compare two DataViews #3700

demensky opened this issue Jun 28, 2023 · 1 comment · Fixed by #3703

Comments

@demensky
Copy link

Describe the bug

The DataView equivalence check occurs without regard to content. It is always displayed as DataView [].

Reproduction

https://stackblitz.com/edit/vitest-dev-vitest-2sqzja?file=test%2Fbasic.test.ts

test('DataView diff', () => {
  const a = new DataView(new Uint8Array([0xaa]).buffer);
  const b = new DataView(new Uint8Array([0xbb]).buffer);

  expect(a).toStrictEqual(b);
});

System Info

System:
    OS: macOS 13.4.1
    CPU: (10) arm64 Apple M1 Max
    Memory: 23.81 GB / 64.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 19.8.1 - /usr/local/bin/node
    Yarn: 1.22.18 - /opt/homebrew/bin/yarn
    npm: 9.5.1 - /usr/local/bin/npm
  Browsers:
    Chrome: 114.0.5735.198
    Chrome Canary: 117.0.5858.0
    Firefox: 113.0.1
    Safari: 16.5.1
  npmPackages:
    @vitest/coverage-c8: ~0.30.1 => 0.30.1 
    vite: ^4.2.2 => 4.2.2 
    vitest: ^0.32.2 => 0.32.2

Used Package Manager

npm

Validations

@stackblitz
Copy link

stackblitz bot commented Jun 28, 2023

Fix this issue in StackBlitz Codeflow Start a new pull request in StackBlitz Codeflow.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants