raspberryGPIOhtmlserver/node_modules/component-inherit/test/inherit.js
node_modules/component-inherit/test/inherit.jsRaw
1
2/**
3 * Module dependencies.
4 */
5
6var inherit = require('..');
7
8describe('inherit(a, b)', function(){
9 it('should inherit b\'s prototype', function(){
10 function Loki(){}
11 function Animal(){}
12
13 Animal.prototype.species = 'unknown';
14
15 inherit(Loki, Animal);
16
17 var loki = new Loki;
18 loki.species.should.equal('unknown');
19 loki.constructor.should.equal(Loki);
20 })
21})