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
575 B

var chai = require('chai');
var assert = chai.assert;
var Jsonrpc = require('../lib/web3/jsonrpc');
describe('lib/web3/jsonrpc', function () {
describe('id', function () {
it('should increment the id', function () {
// given
var a = Jsonrpc.getInstance();
var b = Jsonrpc.getInstance();
var method = 'm';
// when
var p1 = a.toPayload(method);
var p2 = b.toPayload(method);
// then
assert.equal(p2.id, p1.id + 1);
});
});
});