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
--- a/tests/src/createCollection.test.ts
+++ b/tests/src/createCollection.test.ts
@@ -40,8 +40,7 @@
       const badTransaction = async () => {
         await createCollectionExpectSuccess({mode: {type: 'Invalid'}});
       };
-      // tslint:disable-next-line:no-unused-expression
-      expect(badTransaction()).to.be.rejected;
+      await expect(badTransaction()).to.be.rejected;
 
       const BcollectionCount = parseInt((await api.query.nft.createdCollectionCount()).toString(), 10);
       expect(BcollectionCount).to.be.equal(AcollectionCount, 'Error: Incorrect collection created.');