MCPcopy Create free account
hub / github.com/nodejs/node / TestConstructThrow

Function TestConstructThrow

deps/v8/test/mjsunit/es6/proxies-function.js:318–323  ·  view source on GitHub ↗
(trap)

Source from the content-addressed store, hash-verified

316// Throwing from the construct trap.
317
318function TestConstructThrow(trap) {
319 var f = new Proxy(function(){}, {construct: trap});
320 assertThrowsEquals(() => new f(11), "myexn")
321 Object.freeze(f)
322 assertThrowsEquals(() => new f(11), "myexn")
323}
324
325TestConstructThrow(function() { throw "myexn" })
326TestConstructThrow(new Proxy(function() { throw "myexn" }, {}))

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected