Use primitives-json encode & decode (#41)

This commit is contained in:
Jaco Greeff
2017-12-14 22:02:07 +01:00
committed by GitHub
parent c6513b9147
commit 2cde699476
14 changed files with 103 additions and 103 deletions
+13 -15
View File
@@ -3,20 +3,18 @@
const { formatInputs } = require('./index');
describe('formatInputs', () => {
describe('format', () => {
it('formats each value in an array', () => {
expect(
formatInputs(
[
{ name: 'foo', type: 'Address' },
{ name: 'bar', type: 'H256' }
],
['0x1234', '0xabcd']
)
).toEqual([
'0x0000000000000000000000000000000000001234',
'0x000000000000000000000000000000000000000000000000000000000000abcd'
]);
});
it('formats each value in an array', () => {
expect(
formatInputs(
[
{ name: 'foo', type: 'Address' },
{ name: 'bar', type: 'H256' }
],
['0x1234', '0xabcd']
)
).toEqual([
'0x0000000000000000000000000000000000001234',
'0x000000000000000000000000000000000000000000000000000000000000abcd'
]);
});
});