I find this syntax (from the readme) confusing:
var test = TypedJS.addTest('concat :: String -> String -> String', concat);
TypedJS.go([test]);
The "addTest" function name suggests (to me) that TypedJS is maintaining an internal collection of the tests for which I'd expect to be able to call 'go' to run the current tests:
TypedJS.addTest('concat :: String -> String -> String', concat);
TypedJS.go();
Perhaps it would be more appropriate to rename "addTest" to "createTest" and "go" to "runTests"?
var tests = $.map([{
name: concat,
type: "concat :: String, String -> Boolean"},
{
name: add,
type: "add :: Number, Number -> Number"}], function(func) {
return TypedJS.createTest(func.type, func.name);
});
TypedJS.runTests(tests);
I find this syntax (from the readme) confusing:
The "addTest" function name suggests (to me) that TypedJS is maintaining an internal collection of the tests for which I'd expect to be able to call 'go' to run the current tests:
Perhaps it would be more appropriate to rename "addTest" to "createTest" and "go" to "runTests"?