git.delta.rocks / unique-network / refs/commits / 88cc507e215e

difftreelog

tests(xcm): fix parallelization issues with xcm detection

Fahrrader2022-10-14parent: #23067ec.patch.diff
in: master

3 files changed

modifiedtests/src/deprecated-helpers/helpers.tsdiffbeforeafterboth
--- 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<void> {
   await usingApi(async (api) => {
modifiedtests/src/xcm/xcmOpal.test.tsdiffbeforeafterboth
--- 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
modifiedtests/src/xcm/xcmQuartz.test.tsdiffbeforeafterboth
76 let balanceQuartzForeignTokenFinal: bigint;76 let balanceQuartzForeignTokenFinal: bigint;
7777
78 before(async () => {78 before(async () => {
79 console.log('hey babe');
79 await usingApi(async (api, privateKeyWrapper) => {80 await usingApi(async (api, privateKeyWrapper) => {
80 const keyringSr25519 = new Keyring({type: 'sr25519'});81 const keyringSr25519 = new Keyring({type: 'sr25519'});
8182