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
Is your feature request related to a problem? Please describe.
I want to run a report of our current code coverage without actually executing all the tests.
I wrote a shell script to create an html file but it doesn't handle multi-line skipped tests
describe.skip('this is correctly left out of the report', ...
it('this is incorrectly included in the report
It also fails to address JavaScript variable interpolation in the messages provided to it(), describe(), context()`.
This is an excerpt from the simple the bash script I wrote as a workaround.
listSpecsForProject() {
grep -hr "describe(\| context(\| it("$1 \
| grep -v "^ *//" \
| sed -E "s/( *)(describe)\('(.*)',.*/<h3>\3<\/h3>/g" \
| sed -E "s/( *)(describe)\(\"(.*)\",.*/<h3>\3<\/h3>/g" \
| sed -E "s/( *)(describe)\(\`(.*)\`,.*/<h3>\3<\/h3>/g" \
| sed -E "s/( *)(context)\('(.*)',.*/<h4>\3<\/h4>/g" \
| sed -E "s/( *)(context)\(\"(.*)\",.*/<h4>\3<\/h4>/g" \
| sed -E "s/( *)(context)\(\`(.*)\`,.*/<h4>\3<\/h4>/g" \
| sed -E "s/( *)(it)\('(.*)',.*/<li>\3<\/li>/g" \
| sed -E "s/( *)(it)\(\"(.*)\",.*/<li>\3<\/li>/g" \
| sed -E "s/( *)(it)\(\`(.*)\`,.*/<li>\3<\/li>/g"
}
Additional context
Any dry run solution needs to address JavaScript variable interpolation in the messages provided to it(), describe(), context()`. I assume we'd get that for free with Mocha's --dry-run option but haven't investigated.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
I want to run a report of our current code coverage without actually executing all the tests.
Describe the solution you'd like
As of Mocha 9, it has as a --dry-run option. See https://mochajs.org/#-dry-run
Can we add support for this Mocha option?
Describe alternatives you've considered
I wrote a shell script to create an html file but it doesn't handle multi-line skipped tests
It also fails to address JavaScript variable interpolation in the messages provided to
it()
,describe()
, context()`.This is an excerpt from the simple the bash script I wrote as a workaround.
Additional context
Any dry run solution needs to address JavaScript variable interpolation in the messages provided to
it()
,describe()
, context()`. I assume we'd get that for free with Mocha's --dry-run option but haven't investigated.The text was updated successfully, but these errors were encountered: