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

Function TestFunctionToString

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

Source from the content-addressed store, hash-verified

2167}
2168
2169func TestFunctionToString(t *testing.T) {
2170 const SCRIPT = `
2171
2172 Function("arg1", "arg2", "return 42").toString();
2173 `
2174
2175 testScript(SCRIPT, asciiString("function anonymous(arg1,arg2\n) {\nreturn 42\n}"), t)
2176}
2177
2178func TestObjectLiteral(t *testing.T) {
2179 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…