Debian Codegraph @

js/src/jit-test/tests/basic/non-constructor-msg.js

raw
1 load(libdir + 'asserts.js');
2
3 // Censor potentially existing toSource to trigger fallback in ValueToSource.
4 Function.prototype.toSource = null;
5
6 assertTypeErrorMessage(() => { new (function*() {}) },
7 "(function*() {}) is not a constructor");