difftreelog
Merge pull request #41 from usetech-llc/features/NFTPAR-240(path)
in: master
Update helpers.ts
1 file changed
tests/src/util/helpers.tsdiffbeforeafterboth35export async function createCollectionExpectSuccess(name: string, description: string, tokenPrefix: string, mode: string) {35export async function createCollectionExpectSuccess(name: string, description: string, tokenPrefix: string, mode: string) {36 await usingApi(async (api) => {36 await usingApi(async (api) => {37 // Get number of collections before the transaction37 // Get number of collections before the transaction38 const AcollectionCount = parseInt((await api.query.nft.collectionCount()).toString());38 const AcollectionCount = parseInt((await api.query.nft.createdCollectionCount()).toString());393940 // Run the CreateCollection transaction40 // Run the CreateCollection transaction41 const alicePrivateKey = privateKey('//Alice');41 const alicePrivateKey = privateKey('//Alice');44 const result = getCreateCollectionResult(events);44 const result = getCreateCollectionResult(events);454546 // Get number of collections after the transaction46 // Get number of collections after the transaction47 const BcollectionCount = parseInt((await api.query.nft.collectionCount()).toString());47 const BcollectionCount = parseInt((await api.query.nft.createdCollectionCount()).toString());484849 // Get the collection 49 // Get the collection 50 const collection: any = (await api.query.nft.collection(result.collectionId)).toJSON();50 const collection: any = (await api.query.nft.collection(result.collectionId)).toJSON();64export async function createCollectionExpectFailure(name: string, description: string, tokenPrefix: string, mode: string) {64export async function createCollectionExpectFailure(name: string, description: string, tokenPrefix: string, mode: string) {65 await usingApi(async (api) => {65 await usingApi(async (api) => {66 // Get number of collections before the transaction66 // Get number of collections before the transaction67 const AcollectionCount = parseInt((await api.query.nft.collectionCount()).toString());67 const AcollectionCount = parseInt((await api.query.nft.createdCollectionCount()).toString());686869 // Run the CreateCollection transaction69 // Run the CreateCollection transaction70 const alicePrivateKey = privateKey('//Alice');70 const alicePrivateKey = privateKey('//Alice');73 const result = getCreateCollectionResult(events);73 const result = getCreateCollectionResult(events);747475 // Get number of collections after the transaction75 // Get number of collections after the transaction76 const BcollectionCount = parseInt((await api.query.nft.collectionCount()).toString());76 const BcollectionCount = parseInt((await api.query.nft.createdCollectionCount()).toString());777778 // What to expect78 // What to expect79 expect(result.success).to.be.false;79 expect(result.success).to.be.false;