Open Hexagon opened 2 years ago
import { test } from 'uvu'; import * as assert from 'uvu/assert'; test('Circular reference', () => { const obj1 = {}, obj2 = {}; // Very compact infinite linked list obj1.next = obj2; obj2.next = obj1; /* PASS */ assert.equal(obj1.next, obj2); /* FAIL "Circular reference" Maximum call stack size exceeded at dequal (file:///.../node_modules/dequal/dist/index.mjs:11:2) at dequal (file:///.../node_modules/dequal/dist/index.mjs:77:28) */ assert.not.equal(obj1, obj2); }); test.run();