1'use strict'; 2 3const common = require('../../common'); 4const assert = require('assert'); 5const binding = require(`./build/${common.buildType}/test_new_target`); 6 7class Class extends binding.BaseClass { 8 constructor() { 9 super(); 10 this.method(); 11 } 12 method() { 13 this.ok = true; 14 } 15} 16 17assert.ok(new Class() instanceof binding.BaseClass); 18assert.ok(new Class().ok); 19assert.ok(binding.OrdinaryFunction()); 20assert.ok( 21 new binding.Constructor(binding.Constructor) instanceof binding.Constructor); 22