MCPcopy Create free account
hub / github.com/PrairieLearn/PrairieLearn / checkSetsSame

Function checkSetsSame

tests/sync/util.js:451–454  ·  view source on GitHub ↗

* Checks if two sets contain the same elements. * * @param {Set. } setA * @param {Set. } setB * @returns {boolean} whether or not the sets contain the same elements.

(setA, setB)

Source from the content-addressed store, hash-verified

449 * @returns {boolean} whether or not the sets contain the same elements.
450 */
451function checkSetsSame(setA, setB) {
452 const union = setUnion(setA, setB);
453 return setA.size === setB.size && union.size === setA.size;
454}
455
456/**
457 * Asserts that two snapshots match each other. Two snapshots are defined as

Callers 1

util.jsFile · 0.85

Calls 1

setUnionFunction · 0.85

Tested by

no test coverage detected