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

Function TestArray1

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

Source from the content-addressed store, hash-verified

6)
7
8func TestArray1(t *testing.T) {
9 r := &Runtime{}
10 a := r.newArray(nil)
11 a.setOwnIdx(valueInt(0), asciiString("test"), true)
12 if l := a.getStr("length", nil).ToInteger(); l != 1 {
13 t.Fatalf("Unexpected length: %d", l)
14 }
15}
16
17func TestArrayExportProps(t *testing.T) {
18 vm := New()

Callers

nothing calls this directly

Calls 6

newArrayMethod · 0.95
valueIntTypeAlias · 0.85
asciiStringTypeAlias · 0.85
setOwnIdxMethod · 0.65
ToIntegerMethod · 0.65
getStrMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…