MCPcopy Create free account
hub / github.com/apache/thrift / makeUnorderedDeepEqual

Function makeUnorderedDeepEqual

lib/nodejs/test/test_driver.mjs:351–366  ·  view source on GitHub ↗
(assert)

Source from the content-addressed store, hash-verified

349}
350
351function makeUnorderedDeepEqual(assert) {
352 return function (actual, expected, name) {
353 assert.equal(actual.length, expected.length, name);
354 for (const k in actual) {
355 let found = false;
356 for (const k2 in expected) {
357 if (actual[k] === expected[k2]) {
358 found = true;
359 }
360 }
361 if (!found) {
362 assert.fail("Unexpected value " + actual[k] + " with key " + k);
363 }
364 }
365 };
366}

Callers 2

ThriftTestDriverFunction · 0.85
ThriftTestDriverPromiseFunction · 0.85

Calls 1

failMethod · 0.45

Tested by

no test coverage detected