twitst4tz

twitter statistics web application
Log | Files | Refs | README | LICENSE

inherit.js (385B)


      1 
      2 /**
      3  * Module dependencies.
      4  */
      5 
      6 var inherit = require('..');
      7 
      8 describe('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 })