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

Function TestArrayCircularReferenceNumericOperation

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

Source from the content-addressed store, hash-verified

16}
17
18func TestArrayCircularReferenceNumericOperation(t *testing.T) {
19 const SCRIPT = `
20 var T = [1, 2, 3];
21 T[42] = T; // Create circular reference
22 try {
23 var x = T % 2; // This should not crash
24 true;
25 } catch (e) {
26 false;
27 }
28 `
29 testScript(SCRIPT, valueTrue, t)
30}
31
32func TestArrayCircularReferenceJoin(t *testing.T) {
33 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…