mirror of
https://github.com/embarklabs/embark.git
synced 2025-01-10 22:05:55 +00:00
fix: coverage count
Instead of full match, start to count as soon as there is 1 match
This commit is contained in:
parent
c66fe695f0
commit
f32ddc9935
@ -281,10 +281,10 @@ class ContractSource {
|
||||
// Try to match the contract to the bytecode. If it doesn't,
|
||||
// then we bail.
|
||||
|
||||
contractMatches = trace.structLogs.every((step) => bytecode[step.pc]);
|
||||
contractMatches = trace.structLogs.filter((step) => bytecode[step.pc]);
|
||||
if(!contractMatches) continue;
|
||||
|
||||
trace.structLogs.forEach((step) => {
|
||||
contractMatches.forEach((step) => {
|
||||
step = bytecode[step.pc];
|
||||
if(!step.sourceMap || step.sourceMap === '' || step.sourceMap === SourceMap.empty()) return;
|
||||
const sourceMapString = step.sourceMap.toString(this.id);
|
||||
|
Loading…
x
Reference in New Issue
Block a user