web3.js/test/formatters.outputLogFormatt...

28 lines
1.1 KiB
JavaScript
Raw Normal View History

2015-02-27 11:41:07 +00:00
var assert = require('assert');
2015-03-08 17:31:08 +00:00
var formatters = require('../lib/web3/formatters.js');
2015-02-27 11:41:07 +00:00
describe('formatters', function () {
describe('outputLogFormatter', function () {
it('should return the correct value', function () {
assert.deepEqual(formatters.outputLogFormatter({
2015-03-10 16:07:16 +00:00
transactionIndex: '0x3e8',
logIndex: '0x3e8',
blockNumber: '0x3e8',
transactionHash: '0x7b2274657374223a2274657374227d',
blockHash: '0x7b2274657374223a2274657374227d',
2015-02-27 11:41:07 +00:00
data: '0x7b2274657374223a2274657374227d',
2015-03-10 16:07:16 +00:00
topics: ['0x68656c6c6f','0x6d79746f70696373']
2015-02-27 11:41:07 +00:00
}), {
2015-03-10 16:07:16 +00:00
transactionIndex: 1000,
logIndex: 1000,
blockNumber: 1000,
transactionHash: '0x7b2274657374223a2274657374227d',
blockHash: '0x7b2274657374223a2274657374227d',
2015-02-27 11:41:07 +00:00
data: '0x7b2274657374223a2274657374227d',
2015-03-10 16:07:16 +00:00
topics: ['0x68656c6c6f','0x6d79746f70696373']
2015-02-27 11:41:07 +00:00
});
});
});
2015-03-08 17:18:52 +00:00
});