Skip to main content
Module

x/microdiff/tests/cycles.js

A fast, zero dependency object and array comparison library. Significantly faster than most other deep comparison libraries and has full TypeScript support.
Go to Latest
File
import { test } from "uvu";import * as assert from "uvu/assert";import diff from "../dist/index.js";
test("Handles recursive references", () => { const obj1 = {}; obj1.a = obj1; assert.equal(diff(obj1, obj1), []);});
test("Handles recursive references more than 1 level up", () => { const obj1 = { a: {} }; obj1.a.b = obj1; assert.equal(diff(obj1, obj1), []);});
test.run();