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

Function TestArrayCircularReferenceToLocaleString

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

Source from the content-addressed store, hash-verified

52}
53
54func TestArrayCircularReferenceToLocaleString(t *testing.T) {
55 const SCRIPT = `
56 var T = [1, 2, 3];
57 T[42] = T; // Create circular reference
58 var str = T.toLocaleString();
59 // Circular reference should be replaced with empty string
60 str === "1,2,3,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,";
61 `
62 testScript(SCRIPT, valueTrue, t)
63}
64
65func TestArrayMultipleCircularReferences(t *testing.T) {
66 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…