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

Function TestArrayCircularReferenceConcat

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

Source from the content-addressed store, hash-verified

41}
42
43func TestArrayCircularReferenceConcat(t *testing.T) {
44 const SCRIPT = `
45 var T = [1, 2, 3];
46 T[42] = T; // Create circular reference
47 var str = '' + T; // String concatenation
48 // Circular reference should be replaced with empty string
49 str === "1,2,3,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,";
50 `
51 testScript(SCRIPT, valueTrue, t)
52}
53
54func TestArrayCircularReferenceToLocaleString(t *testing.T) {
55 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…