git.delta.rocks / unique-network / refs/commits / 7a7b4a5ca2fe

difftreelog

test fix typo in createAccounts

Fahrrader2022-08-31parent: #c13f6a0.patch.diff
in: master

2 files changed

modifiedtests/src/addCollectionAdmin.test.tsdiffbeforeafterboth
--- a/tests/src/addCollectionAdmin.test.ts
+++ b/tests/src/addCollectionAdmin.test.ts
@@ -33,7 +33,7 @@
 describe('Integration Test addCollectionAdmin(collection_id, new_admin_id):', () => {
   it('Add collection admin.', async () => {
     await usingPlaygrounds(async (helper) => {
-      const [alice, bob] = await helper.arrange.creteAccounts([10n, 10n], donor);
+      const [alice, bob] = await helper.arrange.createAccounts([10n, 10n], donor);
       const {collectionId} = await helper.nft.mintCollection(alice, {name: 'Collection Name', description: 'Collection Description', tokenPrefix: 'COL'});
 
       const collection = await helper.collection.getData(collectionId);
@@ -50,7 +50,7 @@
 describe('Negative Integration Test addCollectionAdmin(collection_id, new_admin_id):', () => {
   it("Not owner can't add collection admin.", async () => {
     await usingPlaygrounds(async (helper) => {
-      const [alice, bob, charlie] = await helper.arrange.creteAccounts([10n, 10n, 10n], donor);
+      const [alice, bob, charlie] = await helper.arrange.createAccounts([10n, 10n, 10n], donor);
       const {collectionId} = await helper.nft.mintCollection(alice, {name: 'Collection Name', description: 'Collection Description', tokenPrefix: 'COL'});
 
       const collection = await helper.collection.getData(collectionId);
@@ -69,7 +69,7 @@
 
   it("Admin can't add collection admin.", async () => {
     await usingPlaygrounds(async (helper) => {
-      const [alice, bob, charlie] = await helper.arrange.creteAccounts([10n, 10n, 10n], donor);
+      const [alice, bob, charlie] = await helper.arrange.createAccounts([10n, 10n, 10n], donor);
       const collection = await helper.nft.mintCollection(alice, {name: 'Collection Name', description: 'Collection Description', tokenPrefix: 'COL'});
 
       await collection.addAdmin(alice, {Substrate: bob.address});
@@ -88,7 +88,7 @@
 
   it("Can't add collection admin of not existing collection.", async () => {
     await usingPlaygrounds(async (helper) => {
-      const [alice, bob] = await helper.arrange.creteAccounts([10n, 10n, 10n], donor);
+      const [alice, bob] = await helper.arrange.createAccounts([10n, 10n, 10n], donor);
       // tslint:disable-next-line: no-bitwise
       const collectionId = (1 << 32) - 1;
 
@@ -102,7 +102,7 @@
 
   it("Can't add an admin to a destroyed collection.", async () => {
     await usingPlaygrounds(async (helper) => {
-      const [alice, bob] = await helper.arrange.creteAccounts([10n, 10n, 10n], donor);
+      const [alice, bob] = await helper.arrange.createAccounts([10n, 10n, 10n], donor);
       const collection = await helper.nft.mintCollection(alice, {name: 'Collection Name', description: 'Collection Description', tokenPrefix: 'COL'});
 
       await collection.burn(alice);
@@ -116,7 +116,7 @@
 
   it('Add an admin to a collection that has reached the maximum number of admins limit', async () => {
     await usingPlaygrounds(async (helper) => {
-      const [alice, ...accounts] = await helper.arrange.creteAccounts([10n, 0n, 0n, 0n, 0n, 0n, 0n, 0n], donor);
+      const [alice, ...accounts] = await helper.arrange.createAccounts([10n, 0n, 0n, 0n, 0n, 0n, 0n, 0n], donor);
       const collection = await helper.nft.mintCollection(alice, {name: 'Collection Name', description: 'Collection Description', tokenPrefix: 'COL'});
 
       const chainAdminLimit = (helper.api!.consts.common.collectionAdminsLimit as any).toNumber();
modifiedtests/src/util/playgrounds/unique.dev.tsdiffbeforeafterboth
70 * @returns array of newly created accounts70 * @returns array of newly created accounts
71 * @example const [acc1, acc2, acc3] = await createAccounts([0n, 10n, 20n], donor); 71 * @example const [acc1, acc2, acc3] = await createAccounts([0n, 10n, 20n], donor);
72 */72 */
73 creteAccounts = async (balances: bigint[], donor: IKeyringPair): Promise<IKeyringPair[]> => {73 createAccounts = async (balances: bigint[], donor: IKeyringPair): Promise<IKeyringPair[]> => {
74 let nonce = await this.helper.chain.getNonce(donor.address);74 let nonce = await this.helper.chain.getNonce(donor.address);
75 const tokenNominal = this.helper.balance.getOneTokenNominal();75 const tokenNominal = this.helper.balance.getOneTokenNominal();
76 const transactions = [];76 const transactions = [];