From 88cc507e215ebf2b2135fd16db1d41812f0fc711 Mon Sep 17 00:00:00 2001 From: Fahrrader Date: Fri, 14 Oct 2022 10:17:18 +0000 Subject: [PATCH] tests(xcm): fix parallelization issues with xcm detection --- --- a/tests/src/deprecated-helpers/helpers.ts +++ b/tests/src/deprecated-helpers/helpers.ts @@ -1764,11 +1764,13 @@ return (await api.rpc.unique.collectionById(collectionId)).unwrap(); } -export const describeXCM = ( - process.env.RUN_XCM_TESTS +export async function describeXCM(title: string, fn: (this: Mocha.Suite) => void, opts: {skip?: boolean} = {}) { + (process.env.RUN_XCM_TESTS && !opts.skip ? describe - : describe.skip -); + : describe.skip)(title, fn); +} + +describeXCM.skip = (name: string, fn: (this: Mocha.Suite) => void) => describeXCM(name, fn, {skip: true}); export async function waitNewBlocks(blocksCount = 1): Promise { await usingApi(async (api) => { --- a/tests/src/xcm/xcmOpal.test.ts +++ b/tests/src/xcm/xcmOpal.test.ts @@ -69,6 +69,7 @@ before(async () => { + console.log('hey babe its opal'); await usingApi(async (api, privateKeyWrapper) => { alice = privateKeyWrapper('//Alice'); bob = privateKeyWrapper('//Bob'); // funds donor --- a/tests/src/xcm/xcmQuartz.test.ts +++ b/tests/src/xcm/xcmQuartz.test.ts @@ -76,6 +76,7 @@ let balanceQuartzForeignTokenFinal: bigint; before(async () => { + console.log('hey babe'); await usingApi(async (api, privateKeyWrapper) => { const keyringSr25519 = new Keyring({type: 'sr25519'}); @@ -434,7 +435,6 @@ }); describeXCM('[XCM] Integration test: Exchanging QTZ with Moonriver', () => { - // Quartz constants let quartzAlice: IKeyringPair; let quartzAssetLocation; -- gitstuff