From 02103120d101646aa1d47811bb725e70f4d59c27 Mon Sep 17 00:00:00 2001 From: Maksandre Date: Tue, 09 Aug 2022 08:12:13 +0000 Subject: [PATCH] fix eslint errors and warnings in tests --- --- a/tests/src/fungible.test.ts +++ b/tests/src/fungible.test.ts @@ -15,9 +15,9 @@ // along with Unique Network. If not, see . 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); --- 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', + ], + }]); }); }); }); --- a/tests/src/removeCollectionAdmin.test.ts +++ b/tests/src/removeCollectionAdmin.test.ts @@ -16,7 +16,7 @@ import chai from 'chai'; import chaiAsPromised from 'chai-as-promised'; -import { usingPlaygrounds } from './util/playgrounds'; +import {usingPlaygrounds} from './util/playgrounds'; chai.use(chaiAsPromised); const expect = chai.expect; -- gitstuff