2017-01-26 10:24:14 +01:00
|
|
|
var chai = require('chai');
|
|
|
|
var assert = chai.assert;
|
|
|
|
var u = require('./helpers/test.utils.js');
|
|
|
|
|
|
|
|
var Eth = require('../packages/web3-eth');
|
|
|
|
var eth = new Eth();
|
|
|
|
|
|
|
|
describe('eth', function() {
|
|
|
|
describe('methods', function() {
|
|
|
|
u.methodExists(eth, 'getBalance');
|
|
|
|
u.methodExists(eth, 'getStorageAt');
|
|
|
|
u.methodExists(eth, 'getTransactionCount');
|
|
|
|
u.methodExists(eth, 'getCode');
|
2017-01-27 14:22:28 +01:00
|
|
|
u.methodExists(eth, 'isSyncing');
|
2017-01-26 10:24:14 +01:00
|
|
|
u.methodExists(eth, 'sendTransaction');
|
|
|
|
u.methodExists(eth, 'call');
|
|
|
|
u.methodExists(eth, 'getBlock');
|
|
|
|
u.methodExists(eth, 'getTransaction');
|
|
|
|
u.methodExists(eth, 'getUncle');
|
|
|
|
u.methodExists(eth, 'getCompilers');
|
|
|
|
u.methodExists(eth.compile, 'lll');
|
|
|
|
u.methodExists(eth.compile, 'solidity');
|
|
|
|
u.methodExists(eth.compile, 'serpent');
|
|
|
|
u.methodExists(eth, 'getBlockTransactionCount');
|
|
|
|
u.methodExists(eth, 'getBlockUncleCount');
|
|
|
|
u.methodExists(eth, 'subscribe');
|
2017-02-08 10:03:12 +01:00
|
|
|
u.methodExists(eth, 'Contract');
|
|
|
|
u.methodExists(eth, 'Iban');
|
2017-01-26 10:24:14 +01:00
|
|
|
|
|
|
|
|
|
|
|
u.methodExists(eth, 'isMining');
|
|
|
|
u.methodExists(eth, 'getCoinbase');
|
|
|
|
u.methodExists(eth, 'getGasPrice');
|
2017-01-27 14:22:28 +01:00
|
|
|
u.methodExists(eth, 'getHashrate');
|
2017-01-26 10:24:14 +01:00
|
|
|
u.methodExists(eth, 'getAccounts');
|
|
|
|
u.methodExists(eth, 'getBlockNumber');
|
2017-02-08 10:03:12 +01:00
|
|
|
|
2017-01-26 10:24:14 +01:00
|
|
|
u.methodExists(eth, 'getProtocolVersion');
|
|
|
|
|
|
|
|
u.methodExists(eth, 'setProvider');
|
2017-02-28 16:02:08 +01:00
|
|
|
u.propertyExists(eth, 'givenProvider');
|
2017-01-26 10:24:14 +01:00
|
|
|
u.propertyExists(eth, 'defaultBlock');
|
|
|
|
u.propertyExists(eth, 'defaultAccount');
|
2017-03-10 11:44:00 +01:00
|
|
|
|
|
|
|
u.propertyExists(eth, 'net');
|
|
|
|
u.methodExists(eth.net, 'getId');
|
|
|
|
u.methodExists(eth.net, 'isListening');
|
|
|
|
u.methodExists(eth.net, 'getPeerCount');
|
|
|
|
|
|
|
|
u.propertyExists(eth, 'personal');
|
|
|
|
u.methodExists(eth.personal, 'sendTransaction');
|
|
|
|
u.methodExists(eth.personal, 'newAccount');
|
|
|
|
u.methodExists(eth.personal, 'unlockAccount');
|
2017-01-26 10:24:14 +01:00
|
|
|
});
|
|
|
|
});
|
|
|
|
|