MCPcopy Create free account
hub / github.com/dop251/goja / TestArrayCircularReferenceComparison

Function TestArrayCircularReferenceComparison

builtin_array_circular_test.go:111–123  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

109}
110
111func TestArrayCircularReferenceComparison(t *testing.T) {
112 const SCRIPT = `
113 var T = [1, 2, 3];
114 T[42] = T; // Create circular reference
115 try {
116 var result = T == 5; // Comparison should not crash
117 true;
118 } catch (e) {
119 false;
120 }
121 `
122 testScript(SCRIPT, valueTrue, t)
123}

Callers

nothing calls this directly

Calls 1

testScriptFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…