Minor Changes
-
Align
@remix-run/assertmore closely withnode:assert/strict.The default export is now callable as an alias for
assert.ok, matching Node'sassert(value)usage. Assertion failures now expose Node-stylecodeandgeneratedMessagefields, core assertion APIs throw customErrormessage objects directly, andthrows/rejects/doesNotThrow/doesNotRejectnow follow Node's expected-error and message argument behavior more closely.Strict equality now uses
Object.is, soNaNequalsNaNand0does not equal-0. Deep equality now compares built-in objects such asDate,RegExp,Error,Map,Set, typed arrays, symbol properties, prototypes, and cyclic structures instead of only comparing enumerable string keys.Added
assert.partialDeepEqual(actual, expected), a strict-by-default counterpart to Node'sassert.partialDeepStrictEqualthat passes whenactualcontains the partial deep structure inexpected.Tightened Node compatibility for assertion behavior, including generated-message metadata, expected-error argument validation,
Errorconstructor and instance matching, partial array and byte-sequence matching,URLSearchParamscomparisons, and invalid-argument handling formatch/doesNotMatch.