difftreelog
tests: displace chai-expect header copypasta
in: master
15 files changed
tests/src/addCollectionAdmin.test.tsdiffbeforeafterboth15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.161617import {IKeyringPair} from '@polkadot/types/types';17import {IKeyringPair} from '@polkadot/types/types';18import chai from 'chai';19import chaiAsPromised from 'chai-as-promised';20import {itSub, usingPlaygrounds} from './util/playgrounds';18import {itSub, usingPlaygrounds, expect} from './util/playgrounds';2122chai.use(chaiAsPromised);23const expect = chai.expect;241925describe('Integration Test addCollectionAdmin(collection_id, new_admin_id):', () => {20describe('Integration Test addCollectionAdmin(collection_id, new_admin_id):', () => {26 let donor: IKeyringPair;21 let donor: IKeyringPair;tests/src/fungible.test.tsdiffbeforeafterboth161617import {IKeyringPair} from '@polkadot/types/types';17import {IKeyringPair} from '@polkadot/types/types';18import {U128_MAX} from './util/helpers';18import {U128_MAX} from './util/helpers';19import {itSub, usingPlaygrounds} from './util/playgrounds';19import {itSub, usingPlaygrounds, expect} from './util/playgrounds';20import chai from 'chai';2021import chaiAsPromised from 'chai-as-promised';21// todo:playgrounds get rid of globals2223chai.use(chaiAsPromised);24const expect = chai.expect;2526let alice: IKeyringPair;22let alice: IKeyringPair;27let bob: IKeyringPair;23let bob: IKeyringPair;tests/src/pallet-presence.test.tsdiffbeforeafterboth14// You should have received a copy of the GNU General Public License14// You should have received a copy of the GNU General Public License15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.161617import {expect} from 'chai';18import {itSub, usingPlaygrounds} from './util/playgrounds';17import {itSub, usingPlaygrounds, expect} from './util/playgrounds';191820// Pallets that must always be present19// Pallets that must always be present21const requiredPallets = [20const requiredPallets = [tests/src/refungible.test.tsdiffbeforeafterboth15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.161617import {IKeyringPair} from '@polkadot/types/types';17import {IKeyringPair} from '@polkadot/types/types';18import {itSub, Pallets, requirePalletsOrSkip, usingPlaygrounds} from './util/playgrounds';18import {itSub, Pallets, requirePalletsOrSkip, usingPlaygrounds, expect} from './util/playgrounds';1920import chai from 'chai';21import chaiAsPromised from 'chai-as-promised';22chai.use(chaiAsPromised);23const expect = chai.expect;241925let alice: IKeyringPair;20let alice: IKeyringPair;26let bob: IKeyringPair;21let bob: IKeyringPair;tests/src/removeCollectionAdmin.test.tsdiffbeforeafterboth14// You should have received a copy of the GNU General Public License14// You should have received a copy of the GNU General Public License15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.161617import chai from 'chai';18import chaiAsPromised from 'chai-as-promised';19import {IKeyringPair} from '@polkadot/types/types';17import {IKeyringPair} from '@polkadot/types/types';20import {itSub, usingPlaygrounds} from './util/playgrounds';18import {itSub, usingPlaygrounds, expect} from './util/playgrounds';2122chai.use(chaiAsPromised);23const expect = chai.expect;241925describe('Integration Test removeCollectionAdmin(collection_id, account_id):', () => {20describe('Integration Test removeCollectionAdmin(collection_id, account_id):', () => {26 let alice: IKeyringPair;21 let alice: IKeyringPair;tests/src/removeCollectionSponsor.test.tsdiffbeforeafterboth14// You should have received a copy of the GNU General Public License14// You should have received a copy of the GNU General Public License15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.161617import chai from 'chai';18import chaiAsPromised from 'chai-as-promised';19import {IKeyringPair} from '@polkadot/types/types';17import {IKeyringPair} from '@polkadot/types/types';20import {itSub, usingPlaygrounds} from './util/playgrounds';18import {itSub, usingPlaygrounds, expect} from './util/playgrounds';2122chai.use(chaiAsPromised);23const expect = chai.expect;241925describe('integration test: ext. removeCollectionSponsor():', () => {20describe('integration test: ext. removeCollectionSponsor():', () => {26 let donor: IKeyringPair;21 let donor: IKeyringPair;tests/src/removeFromAllowList.test.tsdiffbeforeafterboth14// You should have received a copy of the GNU General Public License14// You should have received a copy of the GNU General Public License15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.161617import chai from 'chai';18import chaiAsPromised from 'chai-as-promised';19import {IKeyringPair} from '@polkadot/types/types';17import {IKeyringPair} from '@polkadot/types/types';20import {itSub, usingPlaygrounds} from './util/playgrounds';18import {itSub, usingPlaygrounds, expect} from './util/playgrounds';2122chai.use(chaiAsPromised);23const expect = chai.expect;241925describe('Integration Test removeFromAllowList', () => {20describe('Integration Test removeFromAllowList', () => {26 let alice: IKeyringPair;21 let alice: IKeyringPair;tests/src/rpc.test.tsdiffbeforeafterboth1// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.2// This file is part of Unique Network.34// Unique Network is free software: you can redistribute it and/or modify5// it under the terms of the GNU General Public License as published by6// the Free Software Foundation, either version 3 of the License, or7// (at your option) any later version.89// Unique Network is distributed in the hope that it will be useful,10// but WITHOUT ANY WARRANTY; without even the implied warranty of11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the12// GNU General Public License for more details.1314// You should have received a copy of the GNU General Public License15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.161import {IKeyringPair} from '@polkadot/types/types';17import {IKeyringPair} from '@polkadot/types/types';2import chai from 'chai';3import chaiAsPromised from 'chai-as-promised';4import {usingPlaygrounds, itSub} from './util/playgrounds';18import {usingPlaygrounds, itSub, expect} from './util/playgrounds';5import {crossAccountIdFromLower} from './util/playgrounds/unique';19import {crossAccountIdFromLower} from './util/playgrounds/unique';67chai.use(chaiAsPromised);8const expect = chai.expect;92010describe('integration test: RPC methods', () => {21describe('integration test: RPC methods', () => {11 let donor: IKeyringPair;22 let donor: IKeyringPair;tests/src/setCollectionLimits.test.tsdiffbeforeafterboth161617// https://unique-network.readthedocs.io/en/latest/jsapi.html#setchainlimits17// https://unique-network.readthedocs.io/en/latest/jsapi.html#setchainlimits18import {IKeyringPair} from '@polkadot/types/types';18import {IKeyringPair} from '@polkadot/types/types';19import chai from 'chai';20import chaiAsPromised from 'chai-as-promised';21import {itSub, usingPlaygrounds} from './util/playgrounds';19import {itSub, usingPlaygrounds, expect} from './util/playgrounds';2223chai.use(chaiAsPromised);24const expect = chai.expect;252026const accountTokenOwnershipLimit = 0;21const accountTokenOwnershipLimit = 0;27const sponsoredDataSize = 0;22const sponsoredDataSize = 0;tests/src/setCollectionSponsor.test.tsdiffbeforeafterboth14// You should have received a copy of the GNU General Public License14// You should have received a copy of the GNU General Public License15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.161617import chai from 'chai';18import chaiAsPromised from 'chai-as-promised';19import {IKeyringPair} from '@polkadot/types/types';17import {IKeyringPair} from '@polkadot/types/types';20import {itSub, usingPlaygrounds, Pallets} from './util/playgrounds';18import {itSub, usingPlaygrounds, expect, Pallets} from './util/playgrounds';2122chai.use(chaiAsPromised);23const expect = chai.expect;241925describe('integration test: ext. setCollectionSponsor():', () => {20describe('integration test: ext. setCollectionSponsor():', () => {26 let alice: IKeyringPair;21 let alice: IKeyringPair;tests/src/setMintPermission.test.tsdiffbeforeafterboth15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.161617import {IKeyringPair} from '@polkadot/types/types';17import {IKeyringPair} from '@polkadot/types/types';18import chai from 'chai';19import chaiAsPromised from 'chai-as-promised';20import {itSub, usingPlaygrounds} from './util/playgrounds';18import {itSub, usingPlaygrounds, expect} from './util/playgrounds';2122chai.use(chaiAsPromised);23const expect = chai.expect;241925describe('Integration Test setMintPermission', () => {20describe('Integration Test setMintPermission', () => {26 let alice: IKeyringPair;21 let alice: IKeyringPair;tests/src/setPublicAccessMode.test.tsdiffbeforeafterboth161617// https://unique-network.readthedocs.io/en/latest/jsapi.html#setschemaversion17// https://unique-network.readthedocs.io/en/latest/jsapi.html#setschemaversion18import {IKeyringPair} from '@polkadot/types/types';18import {IKeyringPair} from '@polkadot/types/types';19import chai from 'chai';20import chaiAsPromised from 'chai-as-promised';21import {itSub, usingPlaygrounds} from './util/playgrounds';19import {itSub, usingPlaygrounds, expect} from './util/playgrounds';2223chai.use(chaiAsPromised);24const expect = chai.expect;252026describe('Integration Test setPublicAccessMode(): ', () => {21describe('Integration Test setPublicAccessMode(): ', () => {27 let alice: IKeyringPair;22 let alice: IKeyringPair;tests/src/transfer.test.tsdiffbeforeafterboth15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.161617import {IKeyringPair} from '@polkadot/types/types';17import {IKeyringPair} from '@polkadot/types/types';18import chai from 'chai';19import chaiAsPromised from 'chai-as-promised';20import {itEth, usingEthPlaygrounds} from './eth/util/playgrounds';18import {itEth, usingEthPlaygrounds} from './eth/util/playgrounds';21import {itSub, Pallets, usingPlaygrounds} from './util/playgrounds';19import {itSub, Pallets, usingPlaygrounds, expect} from './util/playgrounds';2223chai.use(chaiAsPromised);24const expect = chai.expect;252026describe('Integration Test Transfer(recipient, collection_id, item_id, value)', () => {21describe('Integration Test Transfer(recipient, collection_id, item_id, value)', () => {27 let alice: IKeyringPair;22 let alice: IKeyringPair;tests/src/transferFrom.test.tsdiffbeforeafterboth15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.161617import {IKeyringPair} from '@polkadot/types/types';17import {IKeyringPair} from '@polkadot/types/types';18import chai from 'chai';19import chaiAsPromised from 'chai-as-promised';20import {itSub, Pallets, usingPlaygrounds} from './util/playgrounds';18import {itSub, Pallets, usingPlaygrounds, expect} from './util/playgrounds';2122chai.use(chaiAsPromised);23const expect = chai.expect;241925describe('Integration Test transferFrom(from, recipient, collection_id, item_id, value):', () => {20describe('Integration Test transferFrom(from, recipient, collection_id, item_id, value):', () => {26 let alice: IKeyringPair;21 let alice: IKeyringPair;tests/src/util/playgrounds/index.tsdiffbeforeafterboth2// SPDX-License-Identifier: Apache-2.02// SPDX-License-Identifier: Apache-2.0334import {IKeyringPair} from '@polkadot/types/types';4import {IKeyringPair} from '@polkadot/types/types';5import chai from 'chai';6import chaiAsPromised from 'chai-as-promised';5import {Context} from 'mocha';7import {Context} from 'mocha';6import config from '../../config';8import config from '../../config';7import '../../interfaces/augment-api-events';9import '../../interfaces/augment-api-events';8import {DevUniqueHelper, SilentLogger, SilentConsole} from './unique.dev';10import {DevUniqueHelper, SilentLogger, SilentConsole} from './unique.dev';9111213chai.use(chaiAsPromised);14export const expect = chai.expect;101511export const usingPlaygrounds = async (code: (helper: DevUniqueHelper, privateKey: (seed: string) => IKeyringPair) => Promise<void>) => {16export const usingPlaygrounds = async (code: (helper: DevUniqueHelper, privateKey: (seed: string) => IKeyringPair) => Promise<void>) => {12 const silentConsole = new SilentConsole();17 const silentConsole = new SilentConsole();