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

Function TestArrayCircularReferenceToString

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

Source from the content-addressed store, hash-verified

5)
6
7func TestArrayCircularReferenceToString(t *testing.T) {
8 const SCRIPT = `
9 var T = [1, 2, 3];
10 T[42] = T; // Create circular reference
11 var str = String(T);
12 // Circular reference should be replaced with empty string
13 str === "1,2,3,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,";
14 `
15 testScript(SCRIPT, valueTrue, t)
16}
17
18func TestArrayCircularReferenceNumericOperation(t *testing.T) {
19 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…