MCPcopy
hub / github.com/konvajs/konva / assertAlmostEqual

Function assertAlmostEqual

test/unit/test-utils.ts:402–406  ·  view source on GitHub ↗
(val1, val2, tol = 0.000001)

Source from the content-addressed store, hash-verified

400}
401
402export const assertAlmostEqual = function (val1, val2, tol = 0.000001) {
403 if (!isClose(val1, val2, tol)) {
404 throw new Error('Expected ' + val1 + ' to be almost equal to ' + val2);
405 }
406};
407
408export const assertAlmostDeepEqual = function (obj1, obj2) {
409 for (var key1 in obj1) {

Callers 4

TextPath-test.tsFile · 0.90
assertAlmostDeepEqualFunction · 0.85

Calls 1

isCloseFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…