mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-11-02 07:43:42 +08:00
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.