Skip to content
This repository was archived by the owner on Jan 6, 2025. It is now read-only.

build: fix runtime errors not being logged out on karma initialization #610

Merged
merged 1 commit into from
Feb 13, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions test/karma-test-shim.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,15 @@ System.config({
});

// Configure the Angular test bed and run all specs once configured.
configureTestBed()
configureTestBed()
.then(runSpecs)
.then(__karma__.start, __karma__.error);
.then(__karma__.start, function(error) {
// Passing in the error object directly to Karma won't log out the stack trace and
// passing the `originalErr` doesn't work correctly either. We have to log out the
// stack trace so we can actually debug errors before the tests have started.
console.error(error.originalErr.stack);
__karma__.error(error);
});


/** Runs the specs in Karma. */
Expand Down