From e8d0aff333c33ead5da0878fa776aa0f42abd567 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Tue, 4 Dec 2018 14:41:18 +0100 Subject: Refactor @0x/contracts-utils from @0x/contracts-core --- contracts/utils/test/libs.ts | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 contracts/utils/test/libs.ts (limited to 'contracts/utils/test/libs.ts') diff --git a/contracts/utils/test/libs.ts b/contracts/utils/test/libs.ts new file mode 100644 index 000000000..81596b2e4 --- /dev/null +++ b/contracts/utils/test/libs.ts @@ -0,0 +1,34 @@ +import { chaiSetup, provider, txDefaults, web3Wrapper } from '@0x/contracts-test-utils'; +import { BlockchainLifecycle } from '@0x/dev-utils'; +import * as chai from 'chai'; + +import { TestConstantsContract } from '../generated-wrappers/test_constants'; +import { artifacts } from '../src'; + +chaiSetup.configure(); +const expect = chai.expect; + +const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper); + +describe('Libs', () => { + beforeEach(async () => { + await blockchainLifecycle.startAsync(); + }); + afterEach(async () => { + await blockchainLifecycle.revertAsync(); + }); + + describe('LibConstants', () => { + describe('ZRX_ASSET_DATA', () => { + it('should have the correct ZRX_ASSET_DATA', async () => { + const testConstants = await TestConstantsContract.deployFrom0xArtifactAsync( + artifacts.TestConstants, + provider, + txDefaults, + ); + const isValid = await testConstants.assertValidZrxAssetData.callAsync(); + expect(isValid).to.be.equal(true); + }); + }); + }); +}); -- cgit v1.2.3