Use as a template literal tag to create an opaque DetailsToken for
use with other assertion functions that might redact unquoted substitution
values (i.e., those that are not output from the quote function)
into lossy typeof output but still preserve them for logging to an
associated console.
The normal convention is to locally rename details to X like
const { details: X, quote: q, Fail } = assert;.
However, note that in most cases it is preferable to instead use the Fail
template literal tag (which has the same input signature but automatically
creates and throws an error):
sky.isBlue() || Fail`${sky.color} should be "blue"`;
The raw property of an input template array is ignored, so a simple
array of strings may be provided directly.
Use as a template literal tag to create an opaque DetailsToken for use with other assertion functions that might redact unquoted substitution values (i.e., those that are not output from the quote function) into lossy
typeofoutput but still preserve them for logging to an associated console.The normal convention is to locally rename
detailstoXlikeconst { details: X, quote: q, Fail } = assert;. However, note that in most cases it is preferable to instead use theFailtemplate literal tag (which has the same input signature but automatically creates and throws an error):The
rawproperty of an input template array is ignored, so a simple array of strings may be provided directly.