non-constructor-msg.js (264B)
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");