You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

23 lines
738 B

var chai = require('chai');
var assert = chai.assert;
var web3 = require('../index');
describe('lib/web3/method', function () {
describe('request', function () {
it('should create proper request', function () {
var callback = function (err, result) {};
var expected = {
method: 'eth_getBalance',
callback: callback,
params: ['0x0000000000000000000000000000000000000000', 'latest'],
};
var request = web3.eth.getBalance.request('0x0000000000000000000000000000000000000000', 'latest', callback);
expected.format = request.format;
assert.deepEqual(request, expected);
});
});
});