difftreelog
Add tests
in: master
NFTPAR-218
7 files changed
tests/src/collision-tests/admVsOwnerChanges.test.tsdiffbeforeafterboth48 ]);
48 ]);
49 const itemBefore: any = await api.query.nft.nftItemList(collectionId, itemId);
49 const itemBefore: any = await api.query.nft.nftItemList(collectionId, itemId);
50 expect(itemBefore.Owner.toString()).not.to.be.eq(Bob.address);
50 expect(itemBefore.Owner.toString()).not.to.be.eq(Bob.address);
51 const blockHash = await api.query.system.number();
52 console.log(`blockHash: ${blockHash}`);
53 });
51 });
54 });
52 });
55});
53});
tests/src/collision-tests/admVsOwnerData.test.tsdiffbeforeafterboth47 ]);
47 ]);
48 const item: any = await api.query.nft.nftItemList(collectionId, itemId);
48 const item: any = await api.query.nft.nftItemList(collectionId, itemId);
49 expect(Array.from(item.VariableData)).to.deep.equal(Array.from([]));
49 expect(Array.from(item.VariableData)).to.deep.equal(Array.from([]));
50 const blockHash = await api.query.system.number();
51 console.log(`blockHash: ${blockHash}`);
52 });
50 });
53 });
51 });
54});
52});
tests/src/collision-tests/admVsOwnerTake.test.tsdiffbeforeafterboth44 ]);
44 ]);
45 const itemBurn: any = await api.query.nft.nftItemList(collectionId, itemId);
45 const itemBurn: any = await api.query.nft.nftItemList(collectionId, itemId);
46 expect(itemBurn.Owner.toString()).to.be.eq('5C4hrfjw9DjXZTzV3MwzrrAr9P1MJhSrvWGWqi1eSuyUpnhM');
46 expect(itemBurn.Owner.toString()).to.be.eq('5C4hrfjw9DjXZTzV3MwzrrAr9P1MJhSrvWGWqi1eSuyUpnhM');
47 const blockHash = await api.query.system.number();
48 console.log(`blockHash: ${blockHash}`);
49 });
47 });
50 });
48 });
51});
49});
tests/src/collision-tests/adminLimitsOff.test.tsdiffbeforeafterbothno changes
tests/src/collision-tests/sponsorPayments.test.tsdiffbeforeafterboth51 expect(alicesBalanceAfter === alicesBalanceBefore).to.be.true;
51 expect(alicesBalanceAfter === alicesBalanceBefore).to.be.true;
52 // tslint:disable-next-line:no-unused-expression
52 // tslint:disable-next-line:no-unused-expression
53 expect(bobsBalanceAfter === bobsBalanceBefore).to.be.true;
53 expect(bobsBalanceAfter === bobsBalanceBefore).to.be.true;
54 const blockHash = await api.query.system.number();
55 console.log(`blockHash: ${blockHash}`);
56 });
54 });
57 });
55 });
58});
56});
tests/src/collision-tests/tokenLimitsOff.test.tsdiffbeforeafterbothno changes
tests/src/collision-tests/turnsOffMinting.test.tsdiffbeforeafterboth41 ]);
41 ]);
42 const itemList: any = await api.query.nft.nftItemList(collectionId, mintItem);
42 const itemList: any = await api.query.nft.nftItemList(collectionId, mintItem);
43 expect(itemList.Owner.toString()).to.be.eq('5C4hrfjw9DjXZTzV3MwzrrAr9P1MJhSrvWGWqi1eSuyUpnhM');
43 expect(itemList.Owner.toString()).to.be.eq('5C4hrfjw9DjXZTzV3MwzrrAr9P1MJhSrvWGWqi1eSuyUpnhM');
44 const blockHash = await api.query.system.number();
45 console.log(`blockHash: ${blockHash}`);
46 });
44 });
47 });
45 });
48});
46});