Skip to content

test: Replace all occurrences of toEqual with toStrictEqual #1211

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

aleksanderkatan
Copy link
Collaborator

No description provided.

@aleksanderkatan aleksanderkatan linked an issue Apr 30, 2025 that may be closed by this pull request
Copy link

github-actions bot commented Apr 30, 2025

pkg.pr.new

packages

pnpm i https://pkg.pr.new/software-mansion/TypeGPU/typegpu@1211
pnpm i https://pkg.pr.new/software-mansion/TypeGPU/typegpu@3ded6b4ebc7d14c260eb6057d05e8cd8e3133eb1

benchmark
view benchmark

commit
view commit

@aleksanderkatan
Copy link
Collaborator Author

I replaced all occurrences of toEqual with toBe when tested value was primitive, and with toStrictEqual otherwise.

I think we can just use toBe for primitives/reference checks and toStrictEqual for everything else by default, and to use toEqual only when it's difficult to provide an expected value that strictly equals (including prototype, undefined props etc.) the actual tested one. Let me know if you agree.

@aleksanderkatan aleksanderkatan marked this pull request as ready for review April 30, 2025 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

test: Replace toEqual with toStrictEqual where applicable
1 participant