github.com/jonasnick/go-ethereum@v0.7.12-0.20150216215225-22176f05d387/cmd/mist/assets/ext/ethereum.js/test/utils.js (about)

     1  var assert = require('assert');
     2  
     3  var methodExists = function (object, method) {
     4      it('should have method ' + method + ' implemented', function() {
     5          assert.equal('function', typeof object[method], 'method ' + method + ' is not implemented');
     6      });
     7  };
     8  
     9  var propertyExists = function (object, property) {
    10      it('should have property ' + property + ' implemented', function() {
    11          assert.notEqual('undefined', typeof object[property], 'property ' + property + ' is not implemented');
    12      });
    13  };
    14  
    15  module.exports = {
    16      methodExists: methodExists,
    17      propertyExists: propertyExists
    18  };
    19