Proxino/TypedJS — Issue #18: Confusing syntax: addTest/go
Author: DazWilkin
Created: 2012-03-07 19:26:11+00:00
State: open

I find this syntax (from the readme) confusing:

```javascript
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:

```javascript
TypedJS.addTest('concat :: String -> String -> String', concat);
TypedJS.go();
```

Perhaps it would be more appropriate to rename "addTest" to "createTest" and "go" to "runTests"?

```javascript
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);​
```