aboutsummaryrefslogtreecommitdiffstats
path: root/test/eth.methods.js
diff options
context:
space:
mode:
authorGav Wood <i@gavwood.com>2015-01-12 00:54:36 +0800
committerGav Wood <i@gavwood.com>2015-01-12 00:54:36 +0800
commitded221fba2cc21e1037a1130d9d142e657a52e89 (patch)
tree48d0c2871eafec7049d0f5c04b24db8d0f91df3f /test/eth.methods.js
parent47687cf085196e2e4fa7ec42ff426f241dae10c5 (diff)
downloaddexon-ded221fba2cc21e1037a1130d9d142e657a52e89.tar
dexon-ded221fba2cc21e1037a1130d9d142e657a52e89.tar.gz
dexon-ded221fba2cc21e1037a1130d9d142e657a52e89.tar.bz2
dexon-ded221fba2cc21e1037a1130d9d142e657a52e89.tar.lz
dexon-ded221fba2cc21e1037a1130d9d142e657a52e89.tar.xz
dexon-ded221fba2cc21e1037a1130d9d142e657a52e89.tar.zst
dexon-ded221fba2cc21e1037a1130d9d142e657a52e89.zip
Merge commit 'ab745d3b0eb89d67db1ed953020c665be3d072ed' into develop
Conflicts: libjsqrc/ethereumjs/.travis.yml libjsqrc/ethereumjs/README.md libjsqrc/ethereumjs/dist/ethereum.js libjsqrc/ethereumjs/dist/ethereum.js.map libjsqrc/ethereumjs/lib/abi.js libjsqrc/ethereumjs/package.json
Diffstat (limited to 'test/eth.methods.js')
-rw-r--r--test/eth.methods.js42
1 files changed, 42 insertions, 0 deletions
diff --git a/test/eth.methods.js b/test/eth.methods.js
new file mode 100644
index 000000000..7190b27d2
--- /dev/null
+++ b/test/eth.methods.js
@@ -0,0 +1,42 @@
+require('es6-promise').polyfill();
+
+var assert = require('assert');
+var web3 = require('../index.js');
+var u = require('./utils.js');
+web3.setProvider(new web3.providers.WebSocketProvider('http://localhost:8080')); // TODO: create some mock provider
+
+describe('web3', function() {
+ describe('eth', function() {
+ it('should have all methods implemented', function() {
+ u.methodExists(web3.eth, 'balanceAt');
+ u.methodExists(web3.eth, 'stateAt');
+ u.methodExists(web3.eth, 'storageAt');
+ u.methodExists(web3.eth, 'countAt');
+ u.methodExists(web3.eth, 'codeAt');
+ u.methodExists(web3.eth, 'transact');
+ u.methodExists(web3.eth, 'call');
+ u.methodExists(web3.eth, 'block');
+ u.methodExists(web3.eth, 'transaction');
+ u.methodExists(web3.eth, 'uncle');
+ u.methodExists(web3.eth, 'compilers');
+ u.methodExists(web3.eth, 'lll');
+ u.methodExists(web3.eth, 'solidity');
+ u.methodExists(web3.eth, 'serpent');
+ u.methodExists(web3.eth, 'logs');
+ });
+
+ it('should have all properties implemented', function () {
+ u.propertyExists(web3.eth, 'coinbase');
+ u.propertyExists(web3.eth, 'listening');
+ u.propertyExists(web3.eth, 'mining');
+ u.propertyExists(web3.eth, 'gasPrice');
+ u.propertyExists(web3.eth, 'account');
+ u.propertyExists(web3.eth, 'accounts');
+ u.propertyExists(web3.eth, 'peerCount');
+ u.propertyExists(web3.eth, 'defaultBlock');
+ u.propertyExists(web3.eth, 'number');
+ });
+ });
+});
+
+