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

Issue generating coverage report using Chutzpah 4.4.13 #823

Open
BitanDas opened this issue Feb 23, 2023 · 1 comment
Open

Issue generating coverage report using Chutzpah 4.4.13 #823

BitanDas opened this issue Feb 23, 2023 · 1 comment

Comments

@BitanDas
Copy link

BitanDas commented Feb 23, 2023

Hi,
We are trying to generate code coverage using Chutzpah 4.4.13. We are getting an error

Error: SyntaxError: Unexpected token (6:7)
**
While Running:**

This error seems to have been generated due to a change in the repository where ecma version was set to 5, in blanket_qunit.js.
Our code has been developed using ecma version 6. Hence, due to this mismatch, we are getting the aforementioned error.

Can anyone suggest a way to override the ecma version from chutzpah.json?

Our chutzpah.json is as follows :

{
"Framework": "qunit",
"RootReferencePathMode": "SettingsFileDirectory",
"EnableCodeCoverage ": "true",
"CodeCoverageExcludes": [ "jquery.js", "-test.js", ".html" ],
"CodeCoverageExecutionMode": "Always",
"IgnoreResourceLoadingErrors": false,
"Parallelism": 1
}

@ruffin--
Copy link

ruffin-- commented Jun 7, 2023

Pretty sure Matthew has said that coverage is dead and not coming back.

Coverage does not work on anything but phantom.js and there are no plans to fix that since the library coverage is built on is deprecated so it would require a total rewrite.

You might try khutzpa (warning: I'm the author). We're working on it now to use with some legacy AngularJS and KnockoutJS code. It's designed to be a drop-in replacement for Chutzpah on the command line and in VS Code, and coverage does seem to be doing fairly well now. I got to spend some "real" time (so not just free time) on it last month and we're in the process of releasing it to internal teams (ie, other than the team that worked on it; aka "teams other than my team") next sprint.

We're just trying to get our usage back up and running, so a number of settings aren't supported yet, but you're, eg, using "RootReferencePathMode": "SettingsFileDirectory",, so I think you might do okay with our "any color you want as long as it's the one we already picked for you" approach. Or maybe just use khutzpa for coverage if everything else is happy.

But do open an issue if it isn't working or you need another setting supported!

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

2 participants