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
1764 return (await api.rpc.unique.collectionById(collectionId)).unwrap();1764 return (await api.rpc.unique.collectionById(collectionId)).unwrap();
1765}1765}
1766
1767export const describe_xcm = (
1768 process.env.RUN_XCM_TESTS
1769 ? describe
1770 : describe.skip
1771);
17721766
1773export 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) => {
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