This repository was archived by the owner on Aug 5, 2022. It is now read-only.

Description
Something like
/* preamble */
...
function internalAssertion( testName, checkpoint ) {
if ( arguments.length === 0 ) {
return 5 /* number of internal assertions to add to the expected number of assertions */;
} else {
/* make assertions about the internal state based on testName and checkpoint */
}
}
...
/* usage */
var testName = "Discovery";
console.log( JSON.stringify( {
assertionCount: 3 + ( typeof internalAssertion === "function" ? internalAssertion() : 0 )
} ) );
...
if ( typeof internalAssertion === "function" ) {
internalAssertion( testName, "afterResourceFound" );
}
/* usage */
... and document the possible values of testName and checkpoint.