ai_old/goja/builtin_function_test.go
2024-09-20 16:50:35 +08:00

15 lines
228 B
Go

package goja
import (
"testing"
)
func TestHashbangInFunctionConstructor(t *testing.T) {
const SCRIPT = `
assert.throws(SyntaxError, function() {
new Function("#!")
});
`
testScriptWithTestLib(SCRIPT, _undefined, t)
}