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

Function TestArrayBindingPatternRestPattern

compiler_test.go:4178–4184  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

4176}
4177
4178func TestArrayBindingPatternRestPattern(t *testing.T) {
4179 const SCRIPT = `
4180 const [a, b, ...[c, d]] = [1, 2, 3, 4];
4181 a === 1 && b === 2 && c === 3 && d === 4;
4182 `
4183 testScript(SCRIPT, valueTrue, t)
4184}
4185
4186func TestForVarPattern(t *testing.T) {
4187 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…