web3.js/test/web3.eth_methods.js
Fabian Vogelsteller bbfefb091c Modularize web3.js (#541)
* added sub packages

* added lerna monopackage management

* check for package is instance

* added method, subscription and utils package

* moved almost all packages

* moved all packages, no umbrella package yet

* added extend to packages

* made contract pass

* made batch tests pass

* expose providers

* fixed test async

* fixed test errors

* fixed test event encode decode

* fixed test formatter tests

* fixed method tests

* fixed method utils

* fixed some eth methods

* fixed some eth methods 2

* bumped version 0.18.3 to republish meteor package

* fixed get* tests

* fixed subscribe tests

* added newBlockHeaders subscription

* remove unpublished package from package.json

* added sendTransaction test

* fixed call test

* moved files to done

* changed extend

* added iban tests

* Fixed ALL tests

* Fixed lint tests

* Fixed contract tests

* added method tests

* added more method tests to test promiEvents extensively

* added confirmation event

* improved method confirmation checking
2017-01-26 10:24:14 +01:00

45 lines
1.5 KiB
JavaScript

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');
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');
u.methodExists(eth, 'contract');
u.methodExists(eth, 'isMining');
u.methodExists(eth, 'getCoinbase');
u.methodExists(eth, 'getGasPrice');
u.methodExists(eth, 'getAccounts');
u.methodExists(eth, 'getBlockNumber');
u.methodExists(eth, 'getProtocolVersion');
u.methodExists(eth, 'setProvider');
u.propertyExists(eth, 'iban');
u.propertyExists(eth, 'providers');
u.propertyExists(eth, 'defaultBlock');
u.propertyExists(eth, 'defaultAccount');
});
});