git.delta.rocks / unique-network / refs/commits / 14cafc128827

difftreelog

test cleanup debug logs

Yaroslav Bolyukin2021-05-14parent: #dfe7fa5.patch.diff
in: master

2 files changed

modifiedtests/src/contracts.test.tsdiffbeforeafterboth
--- a/tests/src/contracts.test.ts
+++ b/tests/src/contracts.test.ts
@@ -64,15 +64,13 @@
       const collectionId = await createCollectionExpectSuccess();
       const tokenId = await createItemExpectSuccess(alice, collectionId, 'NFT');
       const [contract, deployer] = await deployTransferContract(api);
-      const tokenBefore: any = (await api.query.nft.nftItemList(collectionId, tokenId) as any).unwrap();
+      const tokenBefore: any = (await api.query.nft.nftItemList(collectionId, tokenId) as any).toJSON();
       
       // Transfer
-      console.log('transfer using contract');
       const transferTx = contract.tx.transfer(value, gasLimit, bob.address, collectionId, tokenId, 1);
       const events = await submitTransactionAsync(alice, transferTx);
-      console.log('done');
       const result = getGenericResult(events);
-      const tokenAfter: any = (await api.query.nft.nftItemList(collectionId, tokenId) as any).unwrap();
+      const tokenAfter: any = (await api.query.nft.nftItemList(collectionId, tokenId) as any).toJSON();
 
       // tslint:disable-next-line:no-unused-expression
       expect(result.success).to.be.true;
modifiedtests/src/removeCollectionAdmin.test.tsdiffbeforeafterboth
26 await submitTransactionAsync(Alice, addAdminTx);26 await submitTransactionAsync(Alice, addAdminTx);
2727
28 const adminListAfterAddAdmin: any = (await api.query.nft.adminList(collectionId)).toJSON();28 const adminListAfterAddAdmin: any = (await api.query.nft.adminList(collectionId)).toJSON();
29 console.log(adminListAfterAddAdmin);
30 expect(adminListAfterAddAdmin).to.be.deep.contains(normalizeAccountId(Bob.address));29 expect(adminListAfterAddAdmin).to.be.deep.contains(normalizeAccountId(Bob.address));
3130
32 // then remove bob from admins of collection31 // then remove bob from admins of collection