-
Notifications
You must be signed in to change notification settings - Fork 12k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Silent errors in test.ts #2640
Comments
@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 |
You could add your own error logging by changing src/test.ts line 32 from .then(context => context.keys().map(context)) to .then(context => {
try {
return context.keys().map(context);
} catch (e) {
console.error(e.message, e.stack);
throw e;
}
}) 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. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
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 text was updated successfully, but these errors were encountered: