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

docs(assert): document assertStrictEquals() equality comparison behavior #4724

Merged
merged 2 commits into from
May 15, 2024

Conversation

iuioiua
Copy link
Collaborator

@iuioiua iuioiua commented May 14, 2024

Closes #4714

@iuioiua iuioiua requested a review from kt3k as a code owner May 14, 2024 06:50
@iuioiua iuioiua changed the title doc(assert): document assertStrictEquals() equality comparison behavior docs(assert): document assertStrictEquals() equality comparison behavior May 14, 2024
Copy link

codecov bot commented May 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.44%. Comparing base (4398642) to head (745beb4).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4724   +/-   ##
=======================================
  Coverage   91.44%   91.44%           
=======================================
  Files         480      480           
  Lines       37318    37318           
  Branches     5316     5316           
=======================================
  Hits        34126    34126           
  Misses       3136     3136           
  Partials       56       56           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@iuioiua iuioiua enabled auto-merge (squash) May 14, 2024 06:58
Comment on lines 11 to 12
* This function copies the behavior of Node's
* {@linkcode https://nodejs.org/api/assert.html#assertstrictequalactual-expected-message | assert.strictStrictEqual},
Copy link
Member

@kt3k kt3k May 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We also consider the compatibility to jest, vitest, etc. I don't think we need to mention this information (internal design decision details) here

@@ -8,6 +8,12 @@ import { red } from "@std/fmt/colors";
* Make an assertion that `actual` and `expected` are strictly equal. If
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make an assertion that actual and expected are strictly equal

I think this part needs to be updated as it's not technically 'strict equality'

@iuioiua iuioiua requested a review from kt3k May 14, 2024 23:13
Copy link
Member

@kt3k kt3k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@iuioiua iuioiua merged commit 656edda into main May 15, 2024
12 checks passed
@iuioiua iuioiua deleted the assert-strict-equal-node branch May 15, 2024 03:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

assertStrictEquals(-0, +0) should not throw
2 participants