From ea972bdffc3194b098509aa93f5f0c72b308cec0 Mon Sep 17 00:00:00 2001 From: Mike Gerwitz Date: Fri, 21 Oct 2011 10:27:37 -0400 Subject: [PATCH] [#25] Added ability to manually increment assertion count for custom assertions --- test/inc-testcase.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/test/inc-testcase.js b/test/inc-testcase.js index 0db496d..f87460d 100644 --- a/test/inc-testcase.js +++ b/test/inc-testcase.js @@ -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, }; }