Add tests to verify ZRX_ASSET_DATA
This commit is contained in:
@@ -4,6 +4,7 @@ import { SignedOrder } from '@0xproject/types';
|
||||
import { BigNumber } from '@0xproject/utils';
|
||||
import * as chai from 'chai';
|
||||
|
||||
import { TestConstantsContract } from '../../generated_contract_wrappers/test_constants';
|
||||
import { TestLibsContract } from '../../generated_contract_wrappers/test_libs';
|
||||
import { addressUtils } from '../utils/address_utils';
|
||||
import { artifacts } from '../utils/artifacts';
|
||||
@@ -21,6 +22,7 @@ describe('Exchange libs', () => {
|
||||
let signedOrder: SignedOrder;
|
||||
let orderFactory: OrderFactory;
|
||||
let libs: TestLibsContract;
|
||||
let testConstants: TestConstantsContract;
|
||||
|
||||
before(async () => {
|
||||
await blockchainLifecycle.startAsync();
|
||||
@@ -32,6 +34,11 @@ describe('Exchange libs', () => {
|
||||
const accounts = await web3Wrapper.getAvailableAddressesAsync();
|
||||
const makerAddress = accounts[0];
|
||||
libs = await TestLibsContract.deployFrom0xArtifactAsync(artifacts.TestLibs, provider, txDefaults);
|
||||
testConstants = await TestConstantsContract.deployFrom0xArtifactAsync(
|
||||
artifacts.TestConstants,
|
||||
provider,
|
||||
txDefaults,
|
||||
);
|
||||
|
||||
const defaultOrderParams = {
|
||||
...constants.STATIC_ORDER_PARAMS,
|
||||
@@ -52,6 +59,15 @@ describe('Exchange libs', () => {
|
||||
await blockchainLifecycle.revertAsync();
|
||||
});
|
||||
|
||||
describe('LibConstants', () => {
|
||||
describe('ZRX_ASSET_DATA', () => {
|
||||
it('should have the correct ZRX_ASSET_DATA', async () => {
|
||||
const isValid = await testConstants.assertValidZrxAssetData.callAsync();
|
||||
expect(isValid).to.be.equal(true);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('LibOrder', () => {
|
||||
describe('getOrderSchema', () => {
|
||||
it('should output the correct order schema hash', async () => {
|
||||
|
Reference in New Issue
Block a user