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

Function TestArrayCanonicalIndex

array_test.go:31–42  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

29}
30
31func TestArrayCanonicalIndex(t *testing.T) {
32 const SCRIPT = `
33 var a = [];
34 a["00"] = 1;
35 a["01"] = 2;
36 if (a[0] !== undefined) {
37 throw new Error("a[0]");
38 }
39 `
40
41 testScript(SCRIPT, _undefined, t)
42}
43
44func BenchmarkArrayGetStr(b *testing.B) {
45 b.StopTimer()

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…