aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts/test
diff options
context:
space:
mode:
authorGreg Hysen <greg.hysen@gmail.com>2018-05-25 03:29:45 +0800
committerGreg Hysen <greg.hysen@gmail.com>2018-06-08 06:36:18 +0800
commit9b82e2df58cfd7f4dc9954fa93167450919f457f (patch)
tree8b84f49b930ef7053dd34ad10894fc7f57c0e033 /packages/contracts/test
parent3d65341080177bdd436e7628a76e65774b947a38 (diff)
downloaddexon-sol-tools-9b82e2df58cfd7f4dc9954fa93167450919f457f.tar
dexon-sol-tools-9b82e2df58cfd7f4dc9954fa93167450919f457f.tar.gz
dexon-sol-tools-9b82e2df58cfd7f4dc9954fa93167450919f457f.tar.bz2
dexon-sol-tools-9b82e2df58cfd7f4dc9954fa93167450919f457f.tar.lz
dexon-sol-tools-9b82e2df58cfd7f4dc9954fa93167450919f457f.tar.xz
dexon-sol-tools-9b82e2df58cfd7f4dc9954fa93167450919f457f.tar.zst
dexon-sol-tools-9b82e2df58cfd7f4dc9954fa93167450919f457f.zip
Foundation for TestLibAssetProxyDecoder
Diffstat (limited to 'packages/contracts/test')
-rw-r--r--packages/contracts/test/asset_proxy/decoder.ts72
-rw-r--r--packages/contracts/test/libraries/lib_mem.ts2
2 files changed, 73 insertions, 1 deletions
diff --git a/packages/contracts/test/asset_proxy/decoder.ts b/packages/contracts/test/asset_proxy/decoder.ts
new file mode 100644
index 000000000..74e7547d3
--- /dev/null
+++ b/packages/contracts/test/asset_proxy/decoder.ts
@@ -0,0 +1,72 @@
+import { LogWithDecodedArgs, TransactionReceiptWithDecodedLogs, ZeroEx } from '0x.js';
+import { BlockchainLifecycle, devConstants, web3Factory } from '@0xproject/dev-utils';
+import { BigNumber } from '@0xproject/utils';
+import { Web3Wrapper } from '@0xproject/web3-wrapper';
+import BN = require('bn.js');
+import * as chai from 'chai';
+import ethUtil = require('ethereumjs-util');
+import * as Web3 from 'web3';
+
+import { TestLibAssetProxyDecoderContract } from '../../src/contract_wrappers/generated/test_lib_asset_proxy_decoder';
+import { artifacts } from '../../src/utils/artifacts';
+import { chaiSetup } from '../../src/utils/chai_setup';
+import { constants } from '../../src/utils/constants';
+import { AssetProxyId } from '../../src/utils/types';
+import { provider, txDefaults, web3Wrapper } from '../../src/utils/web3_wrapper';
+
+chaiSetup.configure();
+const expect = chai.expect;
+const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper);
+
+describe.only('AssetProxyDecoder', () => {
+ let owner: string;
+ let testAssetProxyDecoder: TestLibAssetProxyDecoderContract;
+
+ before(async () => {
+ // Setup accounts & addresses
+ const accounts = await web3Wrapper.getAvailableAddressesAsync();
+ owner = accounts[0];
+ // Deploy TestLibMem
+ testAssetProxyDecoder = await TestLibAssetProxyDecoderContract.deployFrom0xArtifactAsync(
+ artifacts.TestLibAssetProxyDecoder,
+ provider,
+ txDefaults,
+ );
+ });
+ beforeEach(async () => {
+ await blockchainLifecycle.startAsync();
+ });
+ afterEach(async () => {
+ await blockchainLifecycle.revertAsync();
+ });
+
+ describe('LibAssetProxyDecoder', () => {
+ /*it('should )', async () => {
+ await testAssetProxyDecoder.test1.sendTransactionAsync();
+ });
+
+ it('should )', async () => {
+ await testLibMem.test2.sendTransactionAsync();
+ });
+
+ it('should )', async () => {
+ await testLibMem.test3.sendTransactionAsync();
+ });
+
+ it('should )', async () => {
+ await testLibMem.test4.sendTransactionAsync();
+ });
+
+ it('should )', async () => {
+ await testLibMem.test5.sendTransactionAsync();
+ });
+
+ it('should )', async () => {
+ await testLibMem.test6.sendTransactionAsync();
+ });
+
+ it('should )', async () => {
+ return expect(testLibMem.test7.sendTransactionAsync()).to.be.rejectedWith(constants.REVERT);
+ });*/
+ });
+});
diff --git a/packages/contracts/test/libraries/lib_mem.ts b/packages/contracts/test/libraries/lib_mem.ts
index c861484f3..6ce4ab9b6 100644
--- a/packages/contracts/test/libraries/lib_mem.ts
+++ b/packages/contracts/test/libraries/lib_mem.ts
@@ -18,7 +18,7 @@ chaiSetup.configure();
const expect = chai.expect;
const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper);
-describe.only('LibMem', () => {
+describe('LibMem', () => {
let owner: string;
let testLibMem: TestLibMemContract;