You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using angular-cli@1.0.0-beta.16, node@6.5.0 and karma@1.2.0 (on OS X El Capitan).
When an exception is thrown while the spec files and their dependencies are loaded in test.ts, the output __karma__.error() is barely helpful. In Chrome only 'ERROR' is printed to the node console and it's close to impossible to break on such a caught exception due to too many false positives. PhantomJS prints out a error stack but not the error message.
It would be great if you could log the error before re-throwing it.
In my case, @ngrx/effects@1.1.1 wasn't compatible with @angular@2.0.1, which was difficult to spot without sufficient error logging.
The error stack would refer to the bundled file though, which would make it less helpful. But the error message may be all you need to pinpoint the issue.
@renehamburger would you be interested in submitting a PR with this change? I'd be happy to review it, but would require you to give a short example/repro step of how the reported error changed.
Activity
anton-107 commentedon Oct 14, 2016
@renehamburger how did you find the error? Also a bit stuck on this, hints on how to tackle these type of issues would be helpful
renehamburger commentedon Oct 17, 2016
You could add your own error logging by changing src/test.ts line 32 from
to
The error stack would refer to the bundled file though, which would make it less helpful. But the error message may be all you need to pinpoint the issue.
filipesilva commentedon Oct 17, 2016
@renehamburger would you be interested in submitting a PR with this change? I'd be happy to review it, but would require you to give a short example/repro step of how the reported error changed.
Catches & logs errors in module loading in ng2's test.ts
Catches & logs errors in module loading in ng2's test.ts
Catches & logs errors in module loading in ng2's test.ts
Catches & logs errors in module loading in ng2's test.ts
fix(test): catches module loading errors
fix(test): catches module loading errors
angular-automatic-lock-bot commentedon Sep 6, 2019
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.
fix(test): catches module loading errors