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

gulp test --coverage --files ... throws errors #16396

Closed
jpettitt opened this issue Jun 26, 2018 · 3 comments · Fixed by #16417 or #16432
Closed

gulp test --coverage --files ... throws errors #16396

jpettitt opened this issue Jun 26, 2018 · 3 comments · Fixed by #16417 or #16432

Comments

@jpettitt
Copy link
Contributor

Code coverage appear to not be working

gulp test --coverage --files=extensions/amp-subscriptions/0.1/test/*.js

(passing tests output omitted)

26 06 2018 13:16:00.358:ERROR [coverage]: TypeError: Cannot read property 'text' of undefined
    at /usr/local/google/home/jpettitt/amp/amphtml/node_modules/istanbul/lib/report/html.js:239:52
    at Array.forEach (<anonymous>)
    at annotateFunctions (/usr/local/google/home/jpettitt/amp/amphtml/node_modules/istanbul/lib/report/html.js:224:26)
    at HtmlReport.writeDetailPage (/usr/local/google/home/jpettitt/amp/amphtml/node_modules/istanbul/lib/report/html.js:427:9)
    at /usr/local/google/home/jpettitt/amp/amphtml/node_modules/istanbul/lib/report/html.js:489:26
    at SyncFileWriter.writeFile (/usr/local/google/home/jpettitt/amp/amphtml/node_modules/istanbul/lib/util/file-writer.js:57:9)
    at FileWriter.writeFile (/usr/local/google/home/jpettitt/amp/amphtml/node_modules/istanbul/lib/util/file-writer.js:147:23)
    at /usr/local/google/home/jpettitt/amp/amphtml/node_modules/istanbul/lib/report/html.js:488:24
    at Array.forEach (<anonymous>)
    at HtmlReport.writeFiles (/usr/local/google/home/jpettitt/amp/amphtml/node_modules/istanbul/lib/report/html.js:482:23)
    at /usr/local/google/home/jpettitt/amp/amphtml/node_modules/istanbul/lib/report/html.js:484:22
    at Array.forEach (<anonymous>)
    at HtmlReport.writeFiles (/usr/local/google/home/jpettitt/amp/amphtml/node_modules/istanbul/lib/report/html.js:482:23)
    at HtmlReport.writeReport (/usr/local/google/home/jpettitt/amp/amphtml/node_modules/istanbul/lib/report/html.js:566:14)
    at writeReport (/usr/local/google/home/jpettitt/amp/amphtml/node_modules/karma-coverage/lib/reporter.js:68:16)
    at /usr/local/google/home/jpettitt/amp/amphtml/node_modules/karma-coverage/lib/reporter.js:297:11
26 06 2018 13:16:00.552:ERROR [coverage]: TypeError: Cannot read property 'text' of undefined
    at /usr/local/google/home/jpettitt/amp/amphtml/node_modules/istanbul/lib/report/html.js:239:52
    at Array.forEach (<anonymous>)
    at annotateFunctions (/usr/local/google/home/jpettitt/amp/amphtml/node_modules/istanbul/lib/report/html.js:224:26)
    at HtmlReport.writeDetailPage (/usr/local/google/home/jpettitt/amp/amphtml/node_modules/istanbul/lib/report/html.js:427:9)
    at /usr/local/google/home/jpettitt/amp/amphtml/node_modules/istanbul/lib/report/html.js:489:26
    at SyncFileWriter.writeFile (/usr/local/google/home/jpettitt/amp/amphtml/node_modules/istanbul/lib/util/file-writer.js:57:9)
    at FileWriter.writeFile (/usr/local/google/home/jpettitt/amp/amphtml/node_modules/istanbul/lib/util/file-writer.js:147:23)
    at /usr/local/google/home/jpettitt/amp/amphtml/node_modules/istanbul/lib/report/html.js:488:24
    at Array.forEach (<anonymous>)
    at HtmlReport.writeFiles (/usr/local/google/home/jpettitt/amp/amphtml/node_modules/istanbul/lib/report/html.js:482:23)
    at /usr/local/google/home/jpettitt/amp/amphtml/node_modules/istanbul/lib/report/html.js:484:22
    at Array.forEach (<anonymous>)
    at HtmlReport.writeFiles (/usr/local/google/home/jpettitt/amp/amphtml/node_modules/istanbul/lib/report/html.js:482:23)
    at HtmlReport.writeReport (/usr/local/google/home/jpettitt/amp/amphtml/node_modules/istanbul/lib/report/html.js:566:14)
    at LcovReport.writeReport (/usr/local/google/home/jpettitt/amp/amphtml/node_modules/istanbul/lib/report/lcov.js:55:19)
    at writeReport (/usr/local/google/home/jpettitt/amp/amphtml/node_modules/karma-coverage/lib/reporter.js:68:16)
@rsimha
Copy link
Contributor

rsimha commented Jun 26, 2018

Adding @jonkeller who implemented --coverage

@rsimha
Copy link
Contributor

rsimha commented Jun 27, 2018

Looks like this is due to gotwarlost/istanbul#602 and karma-runner/karma-coverage#157. Looking for a fix.

@jonkeller
Copy link
Contributor

Thanks, @rsimha! I'm no longer on the AMP team, but still pretty close by. Please let me know if I can answer any questions!

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

Successfully merging a pull request may close this issue.

3 participants