Commit Graph

12 Commits

Author SHA1 Message Date
Asher Gomez
0c44d968a2
refactor(assert): vendor code from fmt/colors.ts (#4716)
* refactor(assert): vendor code from `fmt/colors.ts`

* update

* tweak

* tweaks
2024-05-15 15:00:04 +10:00
Asher Gomez
656eddaf77
docs(assert): document assertStrictEquals() equality comparison behavior (#4724)
doc(assert): document `assertStrictEquals()` equality comparison behavior
2024-05-15 12:46:11 +09:00
Asher Gomez
6769253142
chore(assert): revert "handle assertStrictEquals(-0, +0) correctly" (#4718) 2024-05-13 17:50:51 +10:00
Rüdiger Herrmann
ba0522aba0
fix(assert): handle assertStrictEquals(-0, +0) correctly (#4715)
fix(assert): let assertStrictEquals(-0, +0) pass (#4714)

Fix `assertStrictEquals` to consider -0 and +0 to be equal. Follow the
[MDN recommendation] by replacing `Object.is` with `===` and handling
NaNs specifically.

[MDN recommendation]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Equality_comparisons_and_sameness#when_to_use_object.is_versus_triple_equals
2024-05-13 08:41:41 +10:00
Asher Gomez
668c99a41f
fix(assert): don't swallow the original error while creating assertion error (#4701)
fix(assert): remove unreachable logic
2024-05-09 15:39:21 +09:00
Yoshiya Hinosawa
3155f0050a
chore: switch to JSR-oriented codebase (#4650) 2024-04-29 11:57:30 +09:00
Asher Gomez
f57ac69735
refactor(assert,expect): use shared format.ts and diff.ts (#4592) 2024-04-16 17:09:40 +10:00
Asher Gomez
46d9fa594c
chore: update browser-compatible files with declaration (#4560) 2024-04-10 12:43:44 +10:00
Lino Le Van
c46143f0ac
chore: update copyright year (#4046)
* chore: update copyright year

* fix

---------

Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>
2024-01-02 08:11:32 +11:00
Asher Gomez
84a1373b39
chore(assert): complete documentation (#3900) 2023-12-07 04:13:38 +11:00
Yoshiya Hinosawa
ee6856c2ed
refactor: move _util/diff to assert/_diff (#3563) 2023-08-23 16:45:32 +09:00
Asher Gomez
239e85ad6a
BREAKING(testing, assert): move std/testing/asserts to std/assert (#3445) 2023-07-13 16:04:30 +09:00