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

Function TestArrayMultipleCircularReferences

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

Source from the content-addressed store, hash-verified

63}
64
65func TestArrayMultipleCircularReferences(t *testing.T) {
66 const SCRIPT = `
67 var T = [1, 2, 3];
68 T[42] = T;
69 T[76] = T;
70 T[80] = T;
71 var str = String(T);
72 // Should handle multiple circular references - all should be empty strings
73 str.split(',').length === 81;
74 `
75 testScript(SCRIPT, valueTrue, t)
76}
77
78func TestArrayNestedCircularReference(t *testing.T) {
79 const SCRIPT = `

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…