aboutsummaryrefslogtreecommitdiffstats
path: root/test/eth.methods.js
diff options
context:
space:
mode:
authorMarek Kotewicz <marek.kotewicz@gmail.com>2015-01-09 02:59:03 +0800
committerMarek Kotewicz <marek.kotewicz@gmail.com>2015-01-09 02:59:03 +0800
commitb6058a837f9a90bd2973e4be54f0eab85e85674e (patch)
treefe19ccac25b77d1210f603f4eb26f4a1d88d45e5 /test/eth.methods.js
parent5518022a5d153ef514338edcb427a90ad066d064 (diff)
downloaddexon-b6058a837f9a90bd2973e4be54f0eab85e85674e.tar
dexon-b6058a837f9a90bd2973e4be54f0eab85e85674e.tar.gz
dexon-b6058a837f9a90bd2973e4be54f0eab85e85674e.tar.bz2
dexon-b6058a837f9a90bd2973e4be54f0eab85e85674e.tar.lz
dexon-b6058a837f9a90bd2973e4be54f0eab85e85674e.tar.xz
dexon-b6058a837f9a90bd2973e4be54f0eab85e85674e.tar.zst
dexon-b6058a837f9a90bd2973e4be54f0eab85e85674e.zip
methods existance tests in progress
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');
+ });
+ });
+});
+
+