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

Function TestAssignPatternRestTrailingComma

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

Source from the content-addressed store, hash-verified

4218}
4219
4220func TestAssignPatternRestTrailingComma(t *testing.T) {
4221 const SCRIPT = `
4222 ([a, b, ...rest,] = []);
4223 `
4224 _, err := Compile("", SCRIPT, false)
4225 if err == nil {
4226 t.Fatal("Expected an error")
4227 }
4228}
4229
4230func TestFuncParamInitializerSimple(t *testing.T) {
4231 const SCRIPT = `

Callers

nothing calls this directly

Calls 1

CompileFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…