--- a/tests/src/deprecated-helpers/helpers.ts +++ b/tests/src/deprecated-helpers/helpers.ts @@ -1764,12 +1764,6 @@ return (await api.rpc.unique.collectionById(collectionId)).unwrap(); } -export const describe_xcm = ( - process.env.RUN_XCM_TESTS - ? describe - : describe.skip -); - export async function waitNewBlocks(blocksCount = 1): Promise { await usingApi(async (api) => { const promise = new Promise(async (resolve) => { --- a/tests/src/util/playgrounds/index.ts +++ b/tests/src/util/playgrounds/index.ts @@ -12,7 +12,7 @@ chai.use(chaiAsPromised); export const expect = chai.expect; -export const usingPlaygrounds = async (code: (helper: DevUniqueHelper, privateKey: (seed: string) => IKeyringPair) => Promise, url: string = config.substrateUrl) => { +export async function usingPlaygrounds(code: (helper: DevUniqueHelper, privateKey: (seed: string) => IKeyringPair) => Promise, url: string = config.substrateUrl) { const silentConsole = new SilentConsole(); silentConsole.enable(); @@ -28,6 +28,10 @@ await helper.disconnect(); silentConsole.disable(); } +} + +usingPlaygrounds.atUrl = (url: string, code: (helper: DevUniqueHelper, privateKey: (seed: string) => IKeyringPair) => Promise) => { + return usingPlaygrounds(code, url); }; export enum Pallets { @@ -72,3 +76,9 @@ itSubIfWithPallet.only = (name: string, required: string[], cb: (apis: { helper: DevUniqueHelper, privateKey: (seed: string) => IKeyringPair }) => any) => itSubIfWithPallet(name, required, cb, {only: true}); itSubIfWithPallet.skip = (name: string, required: string[], cb: (apis: { helper: DevUniqueHelper, privateKey: (seed: string) => IKeyringPair }) => any) => itSubIfWithPallet(name, required, cb, {skip: true}); itSub.ifWithPallets = itSubIfWithPallet; + +export const describeXcm = ( + process.env.RUN_XCM_TESTS + ? describe + : describe.skip +);