plugeth/test/event.js

23 lines
540 B
JavaScript
Raw Normal View History

2015-01-29 11:35:21 +00:00
var assert = require('assert');
var event = require('../lib/event.js');
describe('event', function () {
it('should create filter input object from given', function () {
// given
var address = '0x012345';
var signature = '0x987654';
// when
2015-01-29 12:32:32 +00:00
var impl = event(address, signature);
2015-01-29 11:35:21 +00:00
var result = impl();
// then
assert.equal(result.address, address);
assert.equal(result.topics.length, 1);
assert.equal(result.topics[0], signature);
});
});
2015-01-29 12:32:32 +00:00