mirror of
https://github.com/hanzoai/babel.git
synced 2026-09-24 16:56:45 +00:00
17 lines
208 B
JavaScript
17 lines
208 B
JavaScript
"use strict";
|
|
|
|
const targets = [];
|
|
function Foo() {
|
|
targets.push(new.target);
|
|
}
|
|
|
|
function Bar() {
|
|
Foo.call(this);
|
|
}
|
|
|
|
new Foo;
|
|
new Bar();
|
|
|
|
expect(targets[0]).toBe(Foo);
|
|
expect(targets[1]).toBeUndefined();
|