Required arguments are not enforced
bfrymire opened this issue · comments
Brent Frymire commented
Given the following code:
runner = new TestRunner();
suite = new TestSuite();
runner.addTestSuite(suite);
var _test = new TestCase(function() {
assertEqual();
}, "_test");
suite.addTestCase(_test);
runner.run();
While running _test
, the assertEqual
function will assert true. This is happening because when first and second arguments are not provided, they'll be defaulted to undefined
, making the assert true.
First and second arguments are required by the jsdocs, but not through code.
Go through each of the functions and make sure arguments that are required throws an error when not supplied.