aboutsummaryrefslogtreecommitdiffstats
path: root/packages/utils/test/abi_utils_test.ts
diff options
context:
space:
mode:
authorfragosti <francesco.agosti93@gmail.com>2018-08-10 06:57:12 +0800
committerfragosti <francesco.agosti93@gmail.com>2018-08-10 06:57:12 +0800
commit938a99f435ca01853ecb31f9267e2ba4b501d206 (patch)
tree6b1aea79d1130206f6f69b68e0747c87616f2fb6 /packages/utils/test/abi_utils_test.ts
parentb2c666bb1f2830211db208ba8398f2de799c8ee6 (diff)
parentf97ec000e109341f7b200d0ff9ff324bf3f97d3e (diff)
downloaddexon-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.ts19
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']);
+ });
+ });
+});