This commit is contained in:
Marek Kotewicz 2015-03-29 21:54:53 +02:00
parent 21791f25ef
commit e213551699
2 changed files with 30 additions and 0 deletions

View File

@ -0,0 +1,12 @@
var chai = require('chai');
var assert = chai.assert;
var web3 = require('../index');
describe('web3.eth', function () {
describe('defaultBlock', function () {
it('should check if defaultBlock is set to proper value', function () {
assert.equal(web3.eth.defaultBlock, 'latest');
});
});
});

View File

@ -28,6 +28,24 @@ var tests = [{
result: '0x31981', result: '0x31981',
formattedResult: new BigNumber('0x31981', 16), formattedResult: new BigNumber('0x31981', 16),
call: 'eth_'+ method call: 'eth_'+ method
}, {
args: ['0xdbdbdb2cbd23b783741e8d7fcf51e459b497e4a6', 0x1],
formattedArgs: ['0xdbdbdb2cbd23b783741e8d7fcf51e459b497e4a6', '0x1'],
result: '0x31981',
formattedResult: new BigNumber('0x31981', 16),
call: 'eth_'+ method
}, {
args: ['1255171934823351805979544608257289442498956485798', 0x1],
formattedArgs: ['0xdbdbdb2cbd23b783741e8d7fcf51e459b497e4a6', '0x1'],
result: '0x31981',
formattedResult: new BigNumber('0x31981', 16),
call: 'eth_'+ method
}, {
args: ['1255171934823351805979544608257289442498956485798'],
formattedArgs: ['0xdbdbdb2cbd23b783741e8d7fcf51e459b497e4a6', 'latest'],
result: '0x31981',
formattedResult: new BigNumber('0x31981', 16),
call: 'eth_'+ method
}]; }];
testMethod.runTests('eth', method, tests); testMethod.runTests('eth', method, tests);