Skip to content

Commit

Permalink
temporary fix for failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
ibudiselic committed Jan 21, 2015
1 parent f79077a commit ed32c04
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions tests/node-test-framework.js
Expand Up @@ -48,13 +48,20 @@ runTests: function(tests, cfg) {
try {
tests[i].run();
} catch (err) {
ok = false;
console.log("FAILURE: " + err);

lines = err.stack.split("\n");
for (j=0; j<lines.length; j++) {
if (lines[j].indexOf("-tests.js") >= 0) {
console.log(lines[j]);
// TODO: fix the framework to only catch assert exceptions
// or add assertThrows or something similar
// (this special case "fixes" the test using the HALT
// instruction which throws an exception as part of its
// normal operation)
if (err.name !== 'Halting') {
ok = false;
console.log("FAILURE: " + err);

lines = err.stack.split("\n");
for (j=0; j<lines.length; j++) {
if (lines[j].indexOf("-tests.js") >= 0) {
console.log(lines[j]);
}
}
}
}
Expand Down

0 comments on commit ed32c04

Please sign in to comment.