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
optimacms-0.1.61 spec/dummy/node_modules/util/node_modules/inherits/test.js
optimacms-0.1.61 spec/dummy/node_modules/node-libs-browser/node_modules/assert/node_modules/inherits/test.js
disco_app-0.18.0 test/dummy/node_modules/assert/node_modules/inherits/test.js
disco_app-0.18.2 test/dummy/node_modules/assert/node_modules/inherits/test.js
disco_app-0.16.1 test/dummy/node_modules/assert/node_modules/inherits/test.js
disco_app-0.15.2 test/dummy/node_modules/assert/node_modules/inherits/test.js
disco_app-0.18.4 test/dummy/node_modules/assert/node_modules/inherits/test.js
disco_app-0.18.1 test/dummy/node_modules/assert/node_modules/inherits/test.js
disco_app-0.12.7.pre.puma.pre.3 test/dummy/node_modules/assert/node_modules/inherits/test.js
disco_app-0.14.0 test/dummy/node_modules/assert/node_modules/inherits/test.js
disco_app-0.13.6.pre.puma.pre.3 test/dummy/node_modules/assert/node_modules/inherits/test.js
tang-0.2.1 spec/tang_app/node_modules/assert/node_modules/inherits/test.js
groonga-client-model-6.0.0 test/apps/rails6.0.3.5/node_modules/assert/node_modules/inherits/test.js
groonga-client-model-6.0.0 test/apps/rails6.1.3/node_modules/assert/node_modules/inherits/test.js
ruby2js-4.0.4 lib/tasks/testrails/node_modules/assert/node_modules/inherits/test.js
ruby2js-4.0.3 lib/tasks/testrails/node_modules/assert/node_modules/inherits/test.js
tang-0.2.0 spec/tang_app/node_modules/assert/node_modules/inherits/test.js
tang-0.1.0 spec/tang_app/node_modules/assert/node_modules/inherits/test.js
tang-0.0.9 spec/tang_app/node_modules/assert/node_modules/inherits/test.js
enju_library-0.3.8 spec/dummy/node_modules/assert/node_modules/inherits/test.js