Skip to content

Commit

Permalink
Fixed tester and added base tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Christopher Harrison committed Jan 17, 2013
1 parent 8d994c4 commit 09aa243
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tdd/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@

// Perform transformations
for (j = 0; j < m; ++j) {
output = output[tests[i].transform[j].fn].apply(null, tests[i].transform[j].args);
output = output[tests[i].transform[j].fn].apply(output, tests[i].transform[j].args);
}

// Callback with comparison result
Expand Down
31 changes: 30 additions & 1 deletion tdd/tests.json
Original file line number Diff line number Diff line change
@@ -1 +1,30 @@
[]
[
{
"id": "TDD Engine",
"input": [
{"a": 1, "b": 2, "c": 3},
{"a": 4, "b": 5, "c": 6}
],
"transform": [],
"expected": [
{"a": 1, "b": 2, "c": 3},
{"a": 4, "b": 5, "c": 6}
]
},
{
"id": "Rewind",
"input": [
{"a": 1},
{"a": 2},
{"a": 3}
],
"transform": [
{"fn": "rewind", "args": []}
],
"expected": [
{"a": 3},
{"a": 2},
{"a": 1}
]
}
]

0 comments on commit 09aa243

Please sign in to comment.