[#25] Added ability to manually increment assertion count for custom assertions
parent
9ea60a18b0
commit
ea972bdffc
|
@ -21,13 +21,19 @@ for ( f in assert )
|
|||
{
|
||||
return function()
|
||||
{
|
||||
acount++;
|
||||
incAssertCount();
|
||||
a.apply( this, arguments );
|
||||
};
|
||||
} )( _assert_cur );
|
||||
}
|
||||
|
||||
|
||||
function incAssertCount()
|
||||
{
|
||||
acount++;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Defines and runs a test case
|
||||
*
|
||||
|
@ -128,6 +134,7 @@ function prepareCaseContext()
|
|||
assertThrows: assert_wrapped.throws,
|
||||
assertDoesNotThrow: assert_wrapped.doesNotThrow,
|
||||
assertIfError: assert_wrapped.ifError,
|
||||
incAssertCount: incAssertCount,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue