git.delta.rocks / unique-network / refs/commits / 02103120d101

difftreelog

fix eslint errors and warnings in tests

Maksandre2022-08-09parent: #c2a1147.patch.diff
in: master

3 files changed

modifiedtests/src/fungible.test.tsdiffbeforeafterboth
--- a/tests/src/fungible.test.ts
+++ b/tests/src/fungible.test.ts
@@ -15,9 +15,9 @@
 // along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 import {IKeyringPair} from '@polkadot/types/types';
-import { U128_MAX } from './util/helpers';
+import {U128_MAX} from './util/helpers';
 
-import { usingPlaygrounds } from './util/playgrounds';
+import {usingPlaygrounds} from './util/playgrounds';
 
 import chai from 'chai';
 import chaiAsPromised from 'chai-as-promised';
@@ -37,16 +37,16 @@
 
   it('Create fungible collection and token', async () => {
     await usingPlaygrounds(async helper => {
-        const collection = await helper.ft.mintCollection(alice, {name: 'test', description: 'test', tokenPrefix: 'trest'});
-        const defaultTokenId = await collection.getLastTokenId();
-        expect(defaultTokenId).to.be.equal(0);
+      const collection = await helper.ft.mintCollection(alice, {name: 'test', description: 'test', tokenPrefix: 'trest'});
+      const defaultTokenId = await collection.getLastTokenId();
+      expect(defaultTokenId).to.be.equal(0);
 
-        await collection.mint(alice, {Substrate: alice.address}, U128_MAX);
-        const aliceBalance = await collection.getBalance({Substrate: alice.address});
-        const itemCountAfter = await collection.getLastTokenId();
+      await collection.mint(alice, {Substrate: alice.address}, U128_MAX);
+      const aliceBalance = await collection.getBalance({Substrate: alice.address});
+      const itemCountAfter = await collection.getLastTokenId();
 
-        expect(itemCountAfter).to.be.equal(defaultTokenId);
-        expect(aliceBalance).to.be.equal(U128_MAX);
+      expect(itemCountAfter).to.be.equal(defaultTokenId);
+      expect(aliceBalance).to.be.equal(U128_MAX);
     });
   });
   
@@ -103,7 +103,7 @@
       await collection.mintWithOneOwner(alice, {Substrate: alice.address}, [
         {value: 500n},
         {value: 400n},
-        {value: 300n}
+        {value: 300n},
       ]);
 
       expect(await collection.getBalance({Substrate: alice.address})).to.be.equal(1200n);
modifiedtests/src/refungible.test.tsdiffbeforeafterboth
--- a/tests/src/refungible.test.ts
+++ b/tests/src/refungible.test.ts
@@ -16,7 +16,7 @@
 
 import {IKeyringPair} from '@polkadot/types/types';
 
-import { usingPlaygrounds } from './util/playgrounds';
+import {usingPlaygrounds} from './util/playgrounds';
 
 import chai from 'chai';
 import chaiAsPromised from 'chai-as-promised';
@@ -105,7 +105,7 @@
       await helper.rft.mintMultipleTokensWithOneOwner(alice, collection.collectionId, {Substrate: alice.address}, [
         {pieces: 1n}, 
         {pieces: 2n}, 
-        {pieces: 100n}
+        {pieces: 100n},
       ]);
       const lastTokenId = await collection.getLastTokenId();
       expect(lastTokenId).to.be.equal(3);
@@ -223,9 +223,9 @@
           collection.collectionId.toString(), 
           token.tokenId.toString(), 
           {Substrate: alice.address}, 
-          '100'
-        ]
-      }])
+          '100',
+        ],
+      }]);
     });
   });
 
@@ -243,9 +243,9 @@
           collection.collectionId.toString(), 
           token.tokenId.toString(), 
           {Substrate: alice.address}, 
-          '50'
-        ]
-      }])
+          '50',
+        ],
+      }]);
     });
   });
 });
modifiedtests/src/removeCollectionAdmin.test.tsdiffbeforeafterboth

no syntactic changes