Skip to content

Commit

Permalink
Adds error output
Browse files Browse the repository at this point in the history
  • Loading branch information
acadet committed Nov 6, 2014
1 parent b664d1a commit ca511d4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "oscar",
"version": "1.0.2",
"name": "Oscar",
"version": "1.0.3",
"devDependencies": {
"grunt": "~0.4.5",
"grunt-ts": "~1.12.1",
Expand Down
2 changes: 1 addition & 1 deletion src/Assert.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class Assert {
}

/**
* Asserts provided function to throw an error
* Asserts provided function throws an error
* @param {() => void} func [description]
*/
static throws(func : () => void) : void {
Expand Down
5 changes: 5 additions & 0 deletions src/TestSuite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,11 @@ class TestSuite implements Oscar.IOscarObserverListener {
} else {
outcome += 'fail">' + testMethod.getName() + ' FAILED';
outcome += '<p class="error">' + testMethod.getError().toString() + '</p>';
console.log(
'%c' + testMethod.getName() + ' failed with error ' + testMethod.getError().message,
'color: red'
);
console.log('%c' + (<any>testMethod.getError()).stack, 'color : red');
}
outcome += '</li>';
}
Expand Down

0 comments on commit ca511d4

Please sign in to comment.