event.js
This commit is contained in:
		
							
								
								
									
										25
									
								
								test/event.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								test/event.js
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,25 @@ | ||||
| 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'; | ||||
|         var e = { | ||||
|             name: 'test', | ||||
|             type: 'event', | ||||
|         }; | ||||
|  | ||||
|         // when | ||||
|         var impl = event(e, address, signature); | ||||
|         var result = impl(); | ||||
|  | ||||
|         // then | ||||
|         assert.equal(result.address, address);  | ||||
|         assert.equal(result.topics.length, 1); | ||||
|         assert.equal(result.topics[0], signature); | ||||
|  | ||||
|     }); | ||||
| }); | ||||
		Reference in New Issue
	
	Block a user