Skip to content

Commit

Permalink
Add a test file for narwhal integration. Has to use print instead of …
Browse files Browse the repository at this point in the history
…console.log. Fails when an assertion fails, something about setInterval...
  • Loading branch information
jzaefferer committed Mar 6, 2012
1 parent 948894a commit d600c31
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions test/narwhal-test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// run with
// node test/node-test.js
var QUnit = require("../qunit/qunit");
QUnit.log(function(details) {
if (!details.result) {
var output = "FAILED: " + (details.message ? details.message + ", " : "");
if (details.actual) {
output += "expected: " + details.expected + ", actual: " + details.actual;
}
if (details.source) {
output += ", " + details.source;
}
print(output);
} else {
print("ok!");
}
});
QUnit.test("yo", function() {
QUnit.equal(true, false);
QUnit.equal(true, false, "gotta fail");
x.y.z;
});

0 comments on commit d600c31

Please sign in to comment.