Sha256: f7d16c0375c02479b1f14b1f5f361b465e136ef2a796511c588b31b9c968453d

Contents?: true

Size: 510 Bytes

Versions: 1515

Compression:

Stored size: 510 Bytes

Contents

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(c instanceof Child)
  assert(c instanceof Parent)
}

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

function Parent() {}

inherits(Child, Parent)

var c = new Child
test(c)

console.log('ok')

Version data entries

1,515 entries across 301 versions & 39 rubygems

Version Path
smock-0.1.209 node_modules/webpack/node_modules/node-libs-browser/node_modules/crypto-browserify/node_modules/browserify-aes/node_modules/inherits/test.js
smock-0.1.209 node_modules/webpack/node_modules/node-libs-browser/node_modules/http-browserify/node_modules/inherits/test.js
smock-0.1.209 node_modules/webpack/node_modules/node-libs-browser/node_modules/readable-stream/node_modules/inherits/test.js
smock-0.1.208 node_modules/webpack/node_modules/watchpack/node_modules/chokidar/node_modules/readdirp/node_modules/readable-stream/node_modules/inherits/test.js
smock-0.1.208 node_modules/webpack/node_modules/node-libs-browser/node_modules/stream-browserify/node_modules/inherits/test.js
smock-0.1.208 node_modules/webpack/node_modules/node-libs-browser/node_modules/readable-stream/node_modules/inherits/test.js
smock-0.1.208 node_modules/webpack/node_modules/node-libs-browser/node_modules/http-browserify/node_modules/inherits/test.js
smock-0.1.208 node_modules/webpack/node_modules/node-libs-browser/node_modules/crypto-browserify/node_modules/browserify-aes/node_modules/inherits/test.js
smock-0.1.208 node_modules/webpack/node_modules/node-libs-browser/node_modules/util/node_modules/inherits/test.js
spider-src-0.1.7 lib/spider-src/support/spider/node_modules/traceur/node_modules/glob/node_modules/inherits/test.js
spider-src-0.1.6 lib/spider-src/support/spider/node_modules/spider-script/node_modules/traceur/node_modules/glob/node_modules/inherits/test.js
trans-0.5.10 template/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/node_modules/inherits/test.js
trans-0.5.10 template/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/node_modules/inherits/test.js
trans-0.5.10 template/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/through2/node_modules/readable-stream/node_modules/inherits/test.js
trans-0.5.10 template/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-stream/node_modules/glob/node_modules/inherits/test.js
trans-0.5.10 template/node_modules/gulp/node_modules/liftoff/node_modules/findup-sync/node_modules/glob/node_modules/inherits/test.js
trans-0.5.10 template/node_modules/gulp/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/inherits/test.js
trans-0.5.10 template/node_modules/gulp/node_modules/gulp-util/node_modules/multipipe/node_modules/duplexer2/node_modules/readable-stream/node_modules/inherits/test.js
trans-0.5.10 template/node_modules/gulp-uglify/node_modules/through2/node_modules/readable-stream/node_modules/inherits/test.js
trans-0.5.10 template/node_modules/gulp-uglify/node_modules/gulp-util/node_modules/through2/node_modules/readable-stream/node_modules/inherits/test.js