difftreelog
test cleanup debug logs
in: master
2 files changed
tests/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;
tests/src/removeCollectionAdmin.test.tsdiffbeforeafterboth26 await submitTransactionAsync(Alice, addAdminTx);26 await submitTransactionAsync(Alice, addAdminTx);272728 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));313032 // then remove bob from admins of collection31 // then remove bob from admins of collection