diff options
author | fragosti <francesco.agosti93@gmail.com> | 2018-08-10 06:57:12 +0800 |
---|---|---|
committer | fragosti <francesco.agosti93@gmail.com> | 2018-08-10 06:57:12 +0800 |
commit | 938a99f435ca01853ecb31f9267e2ba4b501d206 (patch) | |
tree | 6b1aea79d1130206f6f69b68e0747c87616f2fb6 /packages/utils/test/abi_utils_test.ts | |
parent | b2c666bb1f2830211db208ba8398f2de799c8ee6 (diff) | |
parent | f97ec000e109341f7b200d0ff9ff324bf3f97d3e (diff) | |
download | dexon-0x-contracts-938a99f435ca01853ecb31f9267e2ba4b501d206.tar.gz dexon-0x-contracts-938a99f435ca01853ecb31f9267e2ba4b501d206.tar.zst dexon-0x-contracts-938a99f435ca01853ecb31f9267e2ba4b501d206.zip |
Merge branch 'development' of https://github.com/0xProject/0x-monorepo into feature/sra/add-sra-package
Diffstat (limited to 'packages/utils/test/abi_utils_test.ts')
-rw-r--r-- | packages/utils/test/abi_utils_test.ts | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/packages/utils/test/abi_utils_test.ts b/packages/utils/test/abi_utils_test.ts new file mode 100644 index 000000000..0ebee64c4 --- /dev/null +++ b/packages/utils/test/abi_utils_test.ts @@ -0,0 +1,19 @@ +import * as chai from 'chai'; +import 'mocha'; + +import { abiUtils } from '../src'; + +const expect = chai.expect; + +describe('abiUtils', () => { + describe('splitTupleTypes', () => { + it('handles basic types', () => { + const got = abiUtils.splitTupleTypes('tuple(bytes,uint256,address)'); + expect(got).to.deep.equal(['bytes', 'uint256', 'address']); + }); + it('handles nested tuple types', () => { + const got = abiUtils.splitTupleTypes('tuple(tuple(bytes,uint256),address)'); + expect(got).to.deep.equal(['tuple(bytes,uint256)', 'address']); + }); + }); +}); |