mirror of
https://github.com/embarklabs/embark.git
synced 2025-01-11 14:24:24 +00:00
Filter out interfaces from the coverage report
This commit is contained in:
parent
13ab52125a
commit
099e398bf4
@ -97,6 +97,11 @@ class ContractSource {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
isInterface() {
|
||||||
|
return this.contractBytecode !== undefined &&
|
||||||
|
Object.values(this.contractBytecode).every((contractBytecode) => { return (Object.values(contractBytecode).length <= 1); });
|
||||||
|
}
|
||||||
|
|
||||||
/*eslint complexity: ["error", 38]*/
|
/*eslint complexity: ["error", 38]*/
|
||||||
generateCodeCoverage(trace) {
|
generateCodeCoverage(trace) {
|
||||||
if(!this.ast || !this.contractBytecode) throw new Error('Error generating coverage: solc output was not assigned');
|
if(!this.ast || !this.contractBytecode) throw new Error('Error generating coverage: solc output was not assigned');
|
||||||
|
@ -60,6 +60,7 @@ class ContractSources {
|
|||||||
var coverageReport = {};
|
var coverageReport = {};
|
||||||
|
|
||||||
for(var file in this.files) {
|
for(var file in this.files) {
|
||||||
|
if(this.files[file].isInterface()) continue;
|
||||||
coverageReport[file] = this.files[file].generateCodeCoverage(trace);
|
coverageReport[file] = this.files[file].generateCodeCoverage(trace);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user