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

Function TestFuncParamObjectPatternSimple

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

Source from the content-addressed store, hash-verified

4238}
4239
4240func TestFuncParamObjectPatternSimple(t *testing.T) {
4241 const SCRIPT = `
4242 function f({a, b} = {a: 1, b: 2}) {
4243 return "" + a + b;
4244 }
4245 ""+f()+" "+f({a: 3, b: 4});
4246 `
4247 testScript(SCRIPT, asciiString("12 34"), t)
4248}
4249
4250func TestFuncParamRestStackSimple(t *testing.T) {
4251 const SCRIPT = `

Callers

nothing calls this directly

Calls 2

testScriptFunction · 0.85
asciiStringTypeAlias · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…