Permalink
Browse files

cleanup on the results display

  • Loading branch information...
1 parent 8dc7eb4 commit 600dc752937910e8e3817ff8172ffa8efa958fcf @tmpvar committed Feb 21, 2010
Showing with 7 additions and 5 deletions.
  1. +4 −2 README.md
  2. +3 −3 lib/runner.js
View
@@ -42,7 +42,8 @@ Running Tests
**All Suites (Verbose) **
$ node myproject/test/runner.js --verbose
- "Failure: expected <true> found <false> (#undefined undefined in aFailingTest)
+
+ Failure in core suite; method: aFailingTest
Failure: expected <true> found <false>
at Object.assertEquals (/usr/local/lib/node/libraries/mjsunit.js:93:5)
at /usr/local/lib/node/libraries/mjsunit.js:113:11
@@ -62,7 +63,8 @@ Running Tests
**Run a test in isolation**
$ node myproject/test/runner.js --verbose --suite core --test aFailingTest
- "Failure: expected <true> found <false> (#undefined undefined in aFailingTest)
+
+ Failure in core suite; method: aFailingTest
Failure: expected <true> found <false>
at Object.assertEquals (/usr/local/lib/node/libraries/mjsunit.js:93:5)
at /usr/local/lib/node/libraries/mjsunit.js:113:11
View
@@ -38,8 +38,8 @@ exports.run = function(testSuites) {
if (!suite.errors) {
suite.errors = [];
}
- suite.errors.push({ method: test, error: e});
- errors.push({ method: test, error: e});
+ suite.errors.push({ suiteName:suiteName, method: test, error: e});
+ errors.push({ suiteName:suiteName, method: test, error: e});
}
};
@@ -86,7 +86,7 @@ exports.run = function(testSuites) {
if (args.verbose) {
for (var i = 0; i<errors.length; i++)
{
- sys.puts('"' + errors[i].error.message + " (#" + errors[i].error.code + " " + errors[i].error.type + " in " + errors[i].method + ')');
+ sys.puts('\nFailure in ' + errors[i].suiteName + ' suite; method: ' + errors[i].method);
sys.puts(errors[i].error.stack);
}
}

0 comments on commit 600dc75

Please sign in to comment.