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

Function TestBindingPatternRestTrailingComma

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

Source from the content-addressed store, hash-verified

4208}
4209
4210func TestBindingPatternRestTrailingComma(t *testing.T) {
4211 const SCRIPT = `
4212 const [a, b, ...rest,] = [];
4213 `
4214 _, err := Compile("", SCRIPT, false)
4215 if err == nil {
4216 t.Fatal("Expected an error")
4217 }
4218}
4219
4220func TestAssignPatternRestTrailingComma(t *testing.T) {
4221 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…