What does this PR do?
Add file extension to code coverage entries.
With this solution, the Tooling API team won't need to change the api to include the file extension when querying theApexCodeCoverageAggregate object.
BEFORE
because the file extension was not present, the code coverage for classes could be overwritten by the codecoverage of triggers, when both had the same name. Moreover, all code coverage entries were treated as coverage for classes, disregarding the existence of triggers at all.
{
"no-map/Lead":{
"fnMap":{},
"branchMap":{},
"path":"no-map/Lead"
...
}
}
AFTER
Now both code coverage for apex class and triggers exist, and one can't overwrite the other.
{
"no-map/Lead.cls":{
"fnMap":{},
"branchMap":{},
"path":"no-map/Lead.cls"
...
},
"no-map/Lead.trigger":{
"fnMap":{},
"branchMap":{},
"path":"no-map/Lead.trigger"
...
}
}
I attached an output when running these changes in a sandbox that has lots of apex classes and triggers
See PR 309
@W-14481595@
What does this PR do? Add file extension to code coverage entries. With this solution, the Tooling API team won't need to change the api to include the file extension when querying theApexCodeCoverageAggregate object.
What issues does this PR fix or reference? https://github.com/forcedotcom/cli/issues/1813
BEFORE because the file extension was not present, the code coverage for classes could be overwritten by the codecoverage of triggers, when both had the same name. Moreover, all code coverage entries were treated as coverage for classes, disregarding the existence of triggers at all.
{ "no-map/Lead":{ "fnMap":{}, "branchMap":{}, "path":"no-map/Lead" ... } } AFTER Now both code coverage for apex class and triggers exist, and one can't overwrite the other.
{ "no-map/Lead.cls":{ "fnMap":{}, "branchMap":{}, "path":"no-map/Lead.cls" ... }, "no-map/Lead.trigger":{ "fnMap":{}, "branchMap":{}, "path":"no-map/Lead.trigger" ... } } I attached an output when running these changes in a sandbox that has lots of apex classes and triggers
coverage.zip
In this PR Im also enabling developers to quickly run mocha tests using a vscode extension called Mocha Test Explorer.
without this change Mocha Test Explorer feaures won't work and developers will have to run tests using a terminal