15 lines
228 B
Go
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)
|
|
}
|