swc-plugin-coverage-instrument
swc-plugin-coverage-instrument copied to clipboard
Incomplete instrumentation for method as class property
Following class is incompletely covered, the code in propertyFunction is not covered, only the assignment:
class Testing {
method() {
return 'Hello, World! ' + this.propertyFunction();
}
propertyFunction = () => {
return 'Instance';
};
}
export { Testing };
This is the resulting report. Line 7 is not covered by instrumentation.
Similar to https://github.com/kwonoj/swc-plugin-coverage-instrument/issues/247#issuecomment-2397605287, I'm open to accept a PR.
I managed to build a local git clone with the change and paste the wasm file into the node_modules for our app. The cases that were not instrumented before now look good now!