Skip to content

Commit

Permalink
test: improve assertion in test-performance
Browse files Browse the repository at this point in the history
PR-URL: nodejs#20809
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
  • Loading branch information
addaleax authored and BridgeAR committed May 18, 2018
1 parent 30ad079 commit 42a4a60
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 42a4a60

Please sign in to comment.