* Add new.target transform * Catch new.target under only an arrow function * More unsupported reflect.construct cases * Fix node 4 test * Do not transform Methods * More tests * Properly setup function inheritance test * Tests tests tests * Fix ES6 class's new.target * Remove expected output thats supposed to throw.
17 lines
210 B
JavaScript
17 lines
210 B
JavaScript
"use strict";
|
|
|
|
const targets = [];
|
|
function Foo() {
|
|
targets.push(new.target);
|
|
}
|
|
|
|
function Bar() {
|
|
Foo.call(this);
|
|
}
|
|
|
|
new Foo;
|
|
new Bar();
|
|
|
|
assert.equal(targets[0], Foo);
|
|
assert.equal(targets[1], undefined);
|