bfrymire / crispy

Unit testing framework built in GML for GameMaker LTS 2022+

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Required arguments are not enforced

bfrymire opened this issue · comments

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.