Debian Codegraph @

packages/babel-plugin-transform-new-target/test/fixtures/exec/function-class-extended.js

raw
1 "use strict";
2
3 const targets = [];
4 function Foo() {
5 targets.push(new.target);
6 }
7
8 function Bar() {
9 Foo.call(this);
10 }
11
12 new Foo;
13 new Bar();
14
15 expect(targets[0]).toBe(Foo);
16 expect(targets[1]).toBeUndefined();