Skip to content

Commit

Permalink
test: improve assertion in test-performance
Browse files Browse the repository at this point in the history
PR-URL: #20809
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
  • Loading branch information
addaleax authored and MylesBorins committed May 22, 2018
1 parent 7b1c035 commit b664a84
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/sequential/test-performance.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ function checkNodeTiming(props) {
const delta = performance.nodeTiming[prop] - props[prop].around;
assert(Math.abs(delta) < 1000);
} else {
assert.strictEqual(performance.nodeTiming[prop], props[prop]);
assert.strictEqual(performance.nodeTiming[prop], props[prop],
`mismatch for performance property ${prop}: ` +
`${performance.nodeTiming[prop]} vs ${props[prop]}`);
}
}
}
Expand Down

0 comments on commit b664a84

Please sign in to comment.