mirror of
https://github.com/nodejs/node.git
synced 2025-05-21 08:57:07 +00:00

PR-URL: https://github.com/nodejs/node/pull/45579 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
43 lines
1.1 KiB
Plaintext
43 lines
1.1 KiB
Plaintext
Test that new.target can be inspected in Debugger.evaluateOnCallFrame
|
|
|
|
Running test: withExplicitUsage
|
|
{
|
|
className : Function
|
|
description : function C() { const fn = new.target; debugger; }
|
|
objectId : <objectId>
|
|
type : function
|
|
}
|
|
|
|
Running test: withDirectEval
|
|
{
|
|
className : Function
|
|
description : function D() { const fn = eval('new.target'); debugger; }
|
|
objectId : <objectId>
|
|
type : function
|
|
}
|
|
|
|
Running test: withoutExplicitUsage
|
|
{
|
|
className : ReferenceError
|
|
description : ReferenceError: .new.target is not defined at eval (eval at E (:1:1), <anonymous>:1:1) at new E (<anonymous>:13:3) at <anonymous>:1:1
|
|
objectId : <objectId>
|
|
subtype : error
|
|
type : object
|
|
}
|
|
|
|
Running test: withInheritence
|
|
{
|
|
className : Function
|
|
description : class B extends A {}
|
|
objectId : <objectId>
|
|
type : function
|
|
}
|
|
|
|
Running test: withContextAllocatedNewTarget
|
|
{
|
|
className : Function
|
|
description : function F() { () => new.target; // context-allocate. debugger; }
|
|
objectId : <objectId>
|
|
type : function
|
|
}
|