diff options
author | Marek Kotewicz <marek.kotewicz@gmail.com> | 2015-01-12 00:12:37 +0800 |
---|---|---|
committer | Marek Kotewicz <marek.kotewicz@gmail.com> | 2015-01-12 00:12:37 +0800 |
commit | 6c26255979fe8249932beed88e284cf43b806cf7 (patch) | |
tree | c0814aa78bccb50e27af2dd8b6414ad2a1f7ec9b /test/eth.methods.js | |
parent | e2c4525da7a4d50fdba088837853494ef3de9dd7 (diff) | |
parent | e778e127d6b4ab9e8efb514966975b96b85e7dd6 (diff) | |
download | go-tangerine-6c26255979fe8249932beed88e284cf43b806cf7.tar go-tangerine-6c26255979fe8249932beed88e284cf43b806cf7.tar.gz go-tangerine-6c26255979fe8249932beed88e284cf43b806cf7.tar.bz2 go-tangerine-6c26255979fe8249932beed88e284cf43b806cf7.tar.lz go-tangerine-6c26255979fe8249932beed88e284cf43b806cf7.tar.xz go-tangerine-6c26255979fe8249932beed88e284cf43b806cf7.tar.zst go-tangerine-6c26255979fe8249932beed88e284cf43b806cf7.zip |
Merge branch 'tests' into develop
Diffstat (limited to 'test/eth.methods.js')
-rw-r--r-- | test/eth.methods.js | 42 |
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'); + }); + }); +}); + + |