1
0
Fork 0

[#25] Added ability to manually increment assertion count for custom assertions

closure/master
Mike Gerwitz 2011-10-21 10:27:37 -04:00
parent 9ea60a18b0
commit ea972bdffc
1 changed files with 8 additions and 1 deletions

View File

@ -21,13 +21,19 @@ for ( f in assert )
{ {
return function() return function()
{ {
acount++; incAssertCount();
a.apply( this, arguments ); a.apply( this, arguments );
}; };
} )( _assert_cur ); } )( _assert_cur );
} }
function incAssertCount()
{
acount++;
};
/** /**
* Defines and runs a test case * Defines and runs a test case
* *
@ -128,6 +134,7 @@ function prepareCaseContext()
assertThrows: assert_wrapped.throws, assertThrows: assert_wrapped.throws,
assertDoesNotThrow: assert_wrapped.doesNotThrow, assertDoesNotThrow: assert_wrapped.doesNotThrow,
assertIfError: assert_wrapped.ifError, assertIfError: assert_wrapped.ifError,
incAssertCount: incAssertCount,
}; };
} }