git.delta.rocks / unique-network / refs/commits / 5d16a7495f50

difftreelog

test add missing awaits

Yaroslav Bolyukin2021-09-08parent: #d221bab.patch.diff
in: master

2 files changed

modifiedtests/src/collision-tests/adminLimitsOff.test.tsdiffbeforeafterboth
53 ]);53 ]);
54 await timeoutPromise(10000);54 await timeoutPromise(10000);
55 const changeAdminTx4 = api.tx.nft.addCollectionAdmin(collectionId, Alice.address);55 const changeAdminTx4 = api.tx.nft.addCollectionAdmin(collectionId, Alice.address);
56 // tslint:disable-next-line: no-unused-expression
57 expect(submitTransactionExpectFailAsync(Alice, changeAdminTx4)).to.be.rejected;56 await expect(submitTransactionExpectFailAsync(Alice, changeAdminTx4)).to.be.rejected;
5857
59 const adminListAfterAddAdmin: any = (await api.query.nft.adminList(collectionId));58 const adminListAfterAddAdmin: any = (await api.query.nft.adminList(collectionId));
60 expect(adminListAfterAddAdmin).to.be.contains(Eve.address);59 expect(adminListAfterAddAdmin).to.be.contains(Eve.address);
modifiedtests/src/createCollection.test.tsdiffbeforeafterboth
40 const badTransaction = async () => {40 const badTransaction = async () => {
41 await createCollectionExpectSuccess({mode: {type: 'Invalid'}});41 await createCollectionExpectSuccess({mode: {type: 'Invalid'}});
42 };42 };
43 // tslint:disable-next-line:no-unused-expression
44 expect(badTransaction()).to.be.rejected;43 await expect(badTransaction()).to.be.rejected;
4544
46 const BcollectionCount = parseInt((await api.query.nft.createdCollectionCount()).toString(), 10);45 const BcollectionCount = parseInt((await api.query.nft.createdCollectionCount()).toString(), 10);
47 expect(BcollectionCount).to.be.equal(AcollectionCount, 'Error: Incorrect collection created.');46 expect(BcollectionCount).to.be.equal(AcollectionCount, 'Error: Incorrect collection created.');