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

Function TestArrayAssignPatternRestPattern

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

Source from the content-addressed store, hash-verified

4151}
4152
4153func TestArrayAssignPatternRestPattern(t *testing.T) {
4154 const SCRIPT = `
4155 let a, b, z;
4156 [ z, ...[a, b] ] = [0, 1, 2];
4157 z === 0 && a === 1 && b === 2;
4158 `
4159 testScript(SCRIPT, valueTrue, t)
4160}
4161
4162func TestArrayBindingPattern(t *testing.T) {
4163 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…