[skip ci] Fix test helper

feat/remove-ga
Mark Tolmacs 3 weeks ago
parent 2d4005e66d
commit fd590b201d
No known key found for this signature in database

@ -7,10 +7,10 @@ expect.extend({
} }
const COMPARE = 1 / Math.pow(10, precision || 2); const COMPARE = 1 / Math.pow(10, precision || 2);
const pass = received.every( const pass = expected.every(
(point, idx) => (point, idx) =>
Math.abs(expected[idx]?.[0] - point[0]) < COMPARE && Math.abs(received[idx]?.[0] - point[0]) < COMPARE &&
Math.abs(expected[idx]?.[1] - point[1]) < COMPARE, Math.abs(received[idx]?.[1] - point[1]) < COMPARE,
); );
if (!pass) { if (!pass) {

Loading…
Cancel
Save