Skip to content
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

Template parse errors don't appear in report (Angular 2 project) #26

Open
whyboris opened this issue May 19, 2017 · 0 comments
Open

Template parse errors don't appear in report (Angular 2 project) #26

whyboris opened this issue May 19, 2017 · 0 comments

Comments

@whyboris
Copy link

whyboris commented May 19, 2017

In an Angular 2 project, when running tests with progress reporter, errors such as this:

Template parse errors:
The pipe `capitalizeFirstLetter` could not be found ...

do not show up in the nyan reporter.

I have a fix for this; please see #27

The issue occurs here:
DataStore.prototype.saveResultToSuite = function(suite, browser, result) {
in the result object. Specifically result.log is an array of strings (errors) which typically contains one long string that is later parsed. The Template parse errors end up as a second element of this array. And currently, only the first element is saved: brwsr.errors = result.log[0].split('\n');

My solution is to include a conditional to check if there is more than one element in the array, and if so, concatenate them to the first element so that all errors get displayed correctly in the log.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant