ERC1155 Wrapper without chai
This commit is contained in:
		@@ -16,7 +16,7 @@ export {
 | 
				
			|||||||
export { ERC20Wrapper } from './erc20_wrapper';
 | 
					export { ERC20Wrapper } from './erc20_wrapper';
 | 
				
			||||||
export { ERC721Wrapper } from './erc721_wrapper';
 | 
					export { ERC721Wrapper } from './erc721_wrapper';
 | 
				
			||||||
export { ERC1155ProxyWrapper } from './erc1155_proxy_wrapper';
 | 
					export { ERC1155ProxyWrapper } from './erc1155_proxy_wrapper';
 | 
				
			||||||
export { Erc1155Wrapper, ERC1155MintableContract } from '@0x/contracts-erc1155';
 | 
					export { ERC1155MintableContract, Erc1155Wrapper } from '@0x/contracts-erc1155';
 | 
				
			||||||
export { DummyERC20TokenContract } from '@0x/contracts-erc20';
 | 
					export { DummyERC20TokenContract } from '@0x/contracts-erc20';
 | 
				
			||||||
export { DummyERC721TokenContract } from '@0x/contracts-erc721';
 | 
					export { DummyERC721TokenContract } from '@0x/contracts-erc721';
 | 
				
			||||||
export {
 | 
					export {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -64,7 +64,6 @@
 | 
				
			|||||||
        "@types/mocha": "^5.2.7",
 | 
					        "@types/mocha": "^5.2.7",
 | 
				
			||||||
        "@types/node": "*",
 | 
					        "@types/node": "*",
 | 
				
			||||||
        "@0x/typescript-typings": "^4.4.0-beta.2",
 | 
					        "@0x/typescript-typings": "^4.4.0-beta.2",
 | 
				
			||||||
        "@0x/contracts-test-utils": "^3.2.0-beta.3",
 | 
					 | 
				
			||||||
        "ethereum-types": "^2.2.0-beta.2",
 | 
					        "ethereum-types": "^2.2.0-beta.2",
 | 
				
			||||||
        "chai": "^4.0.1",
 | 
					        "chai": "^4.0.1",
 | 
				
			||||||
        "chai-as-promised": "^7.1.0",
 | 
					        "chai-as-promised": "^7.1.0",
 | 
				
			||||||
@@ -82,6 +81,7 @@
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    "dependencies": {
 | 
					    "dependencies": {
 | 
				
			||||||
        "@0x/base-contract": "^5.5.0-beta.3",
 | 
					        "@0x/base-contract": "^5.5.0-beta.3",
 | 
				
			||||||
 | 
					        "@0x/contracts-test-utils": "^3.2.0-beta.3",
 | 
				
			||||||
        "@0x/utils": "^4.6.0-beta.2",
 | 
					        "@0x/utils": "^4.6.0-beta.2",
 | 
				
			||||||
        "@0x/web3-wrapper": "^6.1.0-beta.2",
 | 
					        "@0x/web3-wrapper": "^6.1.0-beta.2",
 | 
				
			||||||
        "lodash": "^4.17.11"
 | 
					        "lodash": "^4.17.11"
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,12 +1,9 @@
 | 
				
			|||||||
import { BigNumber } from '@0x/utils';
 | 
					import { BigNumber } from '@0x/utils';
 | 
				
			||||||
import * as chai from 'chai';
 | 
					 | 
				
			||||||
import { LogWithDecodedArgs, Provider, TransactionReceiptWithDecodedLogs } from 'ethereum-types';
 | 
					import { LogWithDecodedArgs, Provider, TransactionReceiptWithDecodedLogs } from 'ethereum-types';
 | 
				
			||||||
import * as _ from 'lodash';
 | 
					import * as _ from 'lodash';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import { ERC1155MintableContract, ERC1155TransferSingleEventArgs } from './wrappers';
 | 
					import { ERC1155MintableContract, ERC1155TransferSingleEventArgs } from './wrappers';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const expect = chai.expect;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
export class Erc1155Wrapper {
 | 
					export class Erc1155Wrapper {
 | 
				
			||||||
    private readonly _erc1155Contract: ERC1155MintableContract;
 | 
					    private readonly _erc1155Contract: ERC1155MintableContract;
 | 
				
			||||||
    private readonly _contractOwner: string;
 | 
					    private readonly _contractOwner: string;
 | 
				
			||||||
@@ -135,7 +132,9 @@ export class Erc1155Wrapper {
 | 
				
			|||||||
        });
 | 
					        });
 | 
				
			||||||
        const balances = await this.getBalancesAsync(ownersExtended, tokensExtended);
 | 
					        const balances = await this.getBalancesAsync(ownersExtended, tokensExtended);
 | 
				
			||||||
        _.each(balances, (balance: BigNumber, i: number) => {
 | 
					        _.each(balances, (balance: BigNumber, i: number) => {
 | 
				
			||||||
            expect(balance, `${ownersExtended[i]}${tokensExtended[i]}`).to.be.bignumber.equal(expectedBalances[i]);
 | 
					            if (!balance.isEqualTo(expectedBalances[i])) {
 | 
				
			||||||
 | 
					                throw new Error(`${ownersExtended[i]}${tokensExtended[i]} balance not equal ${expectedBalances[i]}`);
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    public async isNonFungibleItemAsync(tokenId: BigNumber): Promise<boolean> {
 | 
					    public async isNonFungibleItemAsync(tokenId: BigNumber): Promise<boolean> {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user