Skip to content

Commit ca511d4

Browse files
committed
Adds error output
1 parent b664d1a commit ca511d4

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"name": "oscar",
3-
"version": "1.0.2",
2+
"name": "Oscar",
3+
"version": "1.0.3",
44
"devDependencies": {
55
"grunt": "~0.4.5",
66
"grunt-ts": "~1.12.1",

src/Assert.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ class Assert {
8080
}
8181

8282
/**
83-
* Asserts provided function to throw an error
83+
* Asserts provided function throws an error
8484
* @param {() => void} func [description]
8585
*/
8686
static throws(func : () => void) : void {

src/TestSuite.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,11 @@ class TestSuite implements Oscar.IOscarObserverListener {
328328
} else {
329329
outcome += 'fail">' + testMethod.getName() + ' FAILED';
330330
outcome += '<p class="error">' + testMethod.getError().toString() + '</p>';
331+
console.log(
332+
'%c' + testMethod.getName() + ' failed with error ' + testMethod.getError().message,
333+
'color: red'
334+
);
335+
console.log('%c' + (<any>testMethod.getError()).stack, 'color : red');
331336
}
332337
outcome += '</li>';
333338
}

0 commit comments

Comments
 (0)