1
0
Fork 0

[#25] Added caseSetUp() for test cases

closure/master
Mike Gerwitz 2011-10-21 09:51:42 -04:00
parent c1207eb3d5
commit 474d8f307d
1 changed files with 5 additions and 0 deletions

View File

@ -28,6 +28,11 @@ module.exports = function( test_case )
context = prepareCaseContext(),
setUp = test_case.setUp;
// perform case-wide setup
test_case.caseSetUp && test_case.caseSetUp.call( context );
// remove unneeded methods so we don't invoke them as tests below
delete test_case.caseSetUp;
delete test_case.setUp;
// run each test in the case