UNPKG

@moonwall/cli

Version:

Testing framework for the Moon family of projects

33 lines (32 loc) 1.8 kB
import "@moonbeam-network/api-augment"; import type { FoundationType, ITestSuiteType } from "@moonwall/types"; /** * * Defines a suite of tests based on provided parameters. * * @param {object} params - The setup parameters for the test suite. * @param {string} params.id - A unique identifier for the test suite (e.g. D03). * @param {string} params.title - The title of the test suite (e.g. 'Fee calculation: congestion handling'). * @param {function} params.testCases - A callback function that houses the individual test cases of this suite. * @param {string} params.foundationMethods - Explicitly specify which foundation these tests will run against reveal which methods to make available. * @param {number} [params.minRtVersion] - The minimum runtime version required for the test suite, otherwise will be skipped. * @param {string} [params.chainType] - The required runtime name required for the test suite, otherwise will be skipped. * @param {string} [params.notChainType] - The runtime name to not run against this test suite, otherwise will not be skipped. * * @returns {void} - No explicit return value, this function results is wrapped and handled by the vitest instance. * @example * describeSuite({ * id: "D01", * title: "Sample test suite", * foundationMethods: "dev", * testCases: ({ it, context, log }) => { * it({ * id: "T01", * title: "Sample test case", * testds: async function () { * expect(true).to.be.true; * }, * }); * }, * }); */ export declare function describeSuite<T extends FoundationType>({ id: suiteId, title, testCases, foundationMethods, minRtVersion, chainType, notChainType, options, }: ITestSuiteType<T>): void;