difftreelog
feat add usingPlaygrounds.atUrl, move describeXcm
in: master
2 files changed
tests/src/deprecated-helpers/helpers.tsdiffbeforeafterboth1764 return (await api.rpc.unique.collectionById(collectionId)).unwrap();1764 return (await api.rpc.unique.collectionById(collectionId)).unwrap();1765}1765}17661767export const describe_xcm = (1768 process.env.RUN_XCM_TESTS1769 ? describe1770 : describe.skip1771);177217661773export async function waitNewBlocks(blocksCount = 1): Promise<void> {1767export async function waitNewBlocks(blocksCount = 1): Promise<void> {1774 await usingApi(async (api) => {1768 await usingApi(async (api) => {tests/src/util/playgrounds/index.tsdiffbeforeafterboth--- 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<void>, url: string = config.substrateUrl) => {
+export async function usingPlaygrounds(code: (helper: DevUniqueHelper, privateKey: (seed: string) => IKeyringPair) => Promise<void>, 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<void>) => {
+ 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
+);