Files
scriptc/packages/runtime
Chris Tate 5af3287c62 Report generatedMessage for empty custom messages as Node does
An empty string message follows Node 24.22's rules for each assertion:

- equal, notEqual, strictEqual, notStrictEqual, deepStrictEqual,
  notDeepStrictEqual and fail pass it to the AssertionError constructor,
  so the message stays empty, or the diff header is the default one, and
  generatedMessage is true (`!message`).
- match, doesNotMatch, and throws with a regex, a class or an object shape
  treat it as no message: the generated message is built and
  generatedMessage is true.
- throws with nothing thrown and doesNotReject end their message with "."
  instead of ": ", and keep generatedMessage false.
- ok and assert() keep the empty message with generatedMessage false.

assert.fail computes generatedMessage from the message value at run time.
Corpus 5521 covers each method with a literal and a computed empty
message.
2026-10-15 19:04:23 -05:00
..
2026-07-22 18:08:04 -05:00
2026-10-15 11:23:16 -05:00