2015-03-23 00:37:41 -07:00
|
|
|
var web3 = require('../index');
|
2015-01-11 08:54:36 -08:00
|
|
|
var assert = require('assert');
|
|
|
|
|
|
|
|
var methodExists = function (object, method) {
|
2015-01-15 02:38:21 -08:00
|
|
|
it('should have method ' + method + ' implemented', function() {
|
2015-03-23 00:37:41 -07:00
|
|
|
web3.setProvider(null);
|
2015-01-15 02:38:21 -08:00
|
|
|
assert.equal('function', typeof object[method], 'method ' + method + ' is not implemented');
|
|
|
|
});
|
2015-01-11 08:54:36 -08:00
|
|
|
};
|
|
|
|
|
|
|
|
var propertyExists = function (object, property) {
|
2015-01-15 02:38:21 -08:00
|
|
|
it('should have property ' + property + ' implemented', function() {
|
2015-03-23 00:37:41 -07:00
|
|
|
web3.setProvider(null);
|
2015-01-21 11:43:20 -08:00
|
|
|
assert.notEqual('undefined', typeof object[property], 'property ' + property + ' is not implemented');
|
2015-01-15 02:38:21 -08:00
|
|
|
});
|
2015-01-11 08:54:36 -08:00
|
|
|
};
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
methodExists: methodExists,
|
|
|
|
propertyExists: propertyExists
|
|
|
|
};
|
|
|
|
|