go.ketch.com/lib/goja@v0.0.1/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 }