2015-03-23 23:10:18 +01:00
|
|
|
var chai = require('chai');
|
|
|
|
var assert = chai.assert;
|
2015-10-07 05:10:02 +02:00
|
|
|
var Web3 = require('../index.js');
|
|
|
|
var web3 = new Web3();
|
2015-03-23 23:10:18 +01:00
|
|
|
var u = require('./helpers/test.utils.js');
|
2015-01-11 17:54:36 +01:00
|
|
|
|
2015-03-25 23:50:39 +01:00
|
|
|
describe('web3.eth', function() {
|
|
|
|
describe('methods', function() {
|
2015-02-20 09:34:26 +01:00
|
|
|
u.methodExists(web3.eth, 'getBalance');
|
2015-03-03 11:11:52 +01:00
|
|
|
u.methodExists(web3.eth, 'getStorageAt');
|
2015-02-20 09:34:26 +01:00
|
|
|
u.methodExists(web3.eth, 'getTransactionCount');
|
2015-03-16 09:58:10 +01:00
|
|
|
u.methodExists(web3.eth, 'getCode');
|
2015-02-20 09:34:26 +01:00
|
|
|
u.methodExists(web3.eth, 'sendTransaction');
|
2015-01-15 11:38:21 +01:00
|
|
|
u.methodExists(web3.eth, 'call');
|
2015-02-20 09:34:26 +01:00
|
|
|
u.methodExists(web3.eth, 'getBlock');
|
|
|
|
u.methodExists(web3.eth, 'getTransaction');
|
|
|
|
u.methodExists(web3.eth, 'getUncle');
|
|
|
|
u.methodExists(web3.eth, 'getCompilers');
|
|
|
|
u.methodExists(web3.eth.compile, 'lll');
|
|
|
|
u.methodExists(web3.eth.compile, 'solidity');
|
|
|
|
u.methodExists(web3.eth.compile, 'serpent');
|
|
|
|
u.methodExists(web3.eth, 'getBlockTransactionCount');
|
|
|
|
u.methodExists(web3.eth, 'getBlockUncleCount');
|
2015-10-07 05:10:02 +02:00
|
|
|
//u.methodExists(web3.eth, 'filter');
|
|
|
|
//u.methodExists(web3.eth, 'contract');
|
2015-01-11 17:54:36 +01:00
|
|
|
|
2015-01-15 11:38:21 +01:00
|
|
|
u.propertyExists(web3.eth, 'coinbase');
|
|
|
|
u.propertyExists(web3.eth, 'mining');
|
|
|
|
u.propertyExists(web3.eth, 'gasPrice');
|
|
|
|
u.propertyExists(web3.eth, 'accounts');
|
|
|
|
u.propertyExists(web3.eth, 'defaultBlock');
|
2015-02-20 09:34:26 +01:00
|
|
|
u.propertyExists(web3.eth, 'blockNumber');
|
2015-01-11 17:54:36 +01:00
|
|
|
});
|
|
|
|
});
|
|
|
|
|