github.com/nuvolaris/goja@v0.0.0-20230825100449-967811910c6d/builtin_function_test.go (about) 1 package goja 2 3 import ( 4 "testing" 5 ) 6 7 func TestHashbangInFunctionConstructor(t *testing.T) { 8 const SCRIPT = ` 9 assert.throws(SyntaxError, function() { 10 new Function("#!") 11 }); 12 ` 13 testScriptWithTestLib(SCRIPT, _undefined, t) 14 }