builtin_function_test.go 228 B

1234567891011121314
  1. package goja
  2. import (
  3. "testing"
  4. )
  5. func TestHashbangInFunctionConstructor(t *testing.T) {
  6. const SCRIPT = `
  7. assert.throws(SyntaxError, function() {
  8. new Function("#!")
  9. });
  10. `
  11. testScriptWithTestLib(SCRIPT, _undefined, t)
  12. }