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

Function TestArrayCircularReferenceJoin

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

Source from the content-addressed store, hash-verified

30}
31
32func TestArrayCircularReferenceJoin(t *testing.T) {
33 const SCRIPT = `
34 var T = [1, 2, 3];
35 T[42] = T; // Create circular reference
36 var str = T.join(',');
37 // Circular reference should be replaced with empty string
38 str === "1,2,3,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,";
39 `
40 testScript(SCRIPT, valueTrue, t)
41}
42
43func TestArrayCircularReferenceConcat(t *testing.T) {
44 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…