git.delta.rocks / unique-network / refs/commits / 3bccb6bdb53e

difftreelog

feat add usingPlaygrounds.atUrl, move describeXcm

Daniel Shiposha2022-10-06parent: #09b9e64.patch.diff
in: master

2 files changed

modifiedtests/src/deprecated-helpers/helpers.tsdiffbeforeafterboth
--- 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<void> {
   await usingApi(async (api) => {
     const promise = new Promise<void>(async (resolve) => {
modifiedtests/src/util/playgrounds/index.tsdiffbeforeafterboth
12chai.use(chaiAsPromised);12chai.use(chaiAsPromised);
13export const expect = chai.expect;13export const expect = chai.expect;
1414
15export const usingPlaygrounds = async (code: (helper: DevUniqueHelper, privateKey: (seed: string) => IKeyringPair) => Promise<void>, url: string = config.substrateUrl) => {15export async function usingPlaygrounds(code: (helper: DevUniqueHelper, privateKey: (seed: string) => IKeyringPair) => Promise<void>, url: string = config.substrateUrl) {
16 const silentConsole = new SilentConsole();16 const silentConsole = new SilentConsole();
17 silentConsole.enable();17 silentConsole.enable();
1818
28 await helper.disconnect();28 await helper.disconnect();
29 silentConsole.disable();29 silentConsole.disable();
30 }30 }
31};31}
32
33usingPlaygrounds.atUrl = (url: string, code: (helper: DevUniqueHelper, privateKey: (seed: string) => IKeyringPair) => Promise<void>) => {
34 return usingPlaygrounds(code, url);
35};
3236
33export enum Pallets {37export enum Pallets {
34 Inflation = 'inflation',38 Inflation = 'inflation',
73itSubIfWithPallet.skip = (name: string, required: string[], cb: (apis: { helper: DevUniqueHelper, privateKey: (seed: string) => IKeyringPair }) => any) => itSubIfWithPallet(name, required, cb, {skip: true});77itSubIfWithPallet.skip = (name: string, required: string[], cb: (apis: { helper: DevUniqueHelper, privateKey: (seed: string) => IKeyringPair }) => any) => itSubIfWithPallet(name, required, cb, {skip: true});
74itSub.ifWithPallets = itSubIfWithPallet;78itSub.ifWithPallets = itSubIfWithPallet;
79
80export const describeXcm = (
81 process.env.RUN_XCM_TESTS
82 ? describe
83 : describe.skip
84);
7585