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

fix: no dangling comma is included in result #366

Merged
merged 2 commits into from
Apr 18, 2024

Conversation

peternhale
Copy link
Collaborator

@W-15530915@
Fix the edge case to prevent dangling comma when tests are not run with coverage

The vscode-core extension has a setting that lets the cutomer choose if the do not want code coverage calculated when running apex tests. With no coverage data present the code that produces the json results, which are used to highlight coverage in vscode, was inserting a comma after the test results, resulting in an invalid json file.

This fix properly handless tests run with no code coverage present.

@W-15530915@
Fix the edge case to prevent dangling comma when tests are not run with coverage
@peternhale peternhale requested review from diyer and daphne-sfdc April 17, 2024 17:32
Copy link
Contributor

@daphne-sfdc daphne-sfdc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved! 🎉

Thanks Pete for fixing this dangling commas error 🙂

Test result files now have no dangling commas and code coverage is present again ✅

QE doc here: https://salesforce.quip.com/DXmnAhMNNOBZ

@peternhale peternhale merged commit 962af40 into main Apr 18, 2024
9 checks passed
@peternhale peternhale deleted the phale/W-15530915-fix-dangling-comma branch April 18, 2024 12:17
gilgourevitch pushed a commit to gilgourevitch/salesforcedx-apex that referenced this pull request Jun 6, 2024
* fix: no dangling comma is included in result

@W-15530915@
Fix the edge case to prevent dangling comma when tests are not run with coverage

* Update test/streaming/testResultStringifyStream.test.ts

Co-authored-by: Daphne Yang <[email protected]>

---------

Co-authored-by: Daphne Yang <[email protected]>
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

Successfully merging this pull request may close these issues.

2 participants