Вход Регистрация
Файл: error-kitty/node_modules/mocha/node_modules/glob/node_modules/inherits/test.js
Строк: 24
<?php
var inherits = require('./inherits.js')
var 
assert = require('assert')

function 
test(c) {
  
assert(c.constructor === Child)
  
assert(c.constructor.super_ === Parent)
  
assert(Object.getPrototypeOf(c) === Child.prototype)
  
assert(Object.getPrototypeOf(Object.getPrototypeOf(c)) === Parent.prototype)
  
assert(instanceof Child)
  
assert(instanceof Parent)
}

function 
Child() {
  
Parent.call(this)
  
test(this)
}

function 
Parent() {}

inherits(ChildParent)

var 
= new Child
test
(c)

console.log('ok')
?>
Онлайн: 1
Реклама