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