quickpickle
Version:
Plugin for Vitest to run tests written in Gherkin Syntax.
44 lines (43 loc) • 1.51 kB
TypeScript
import type { Feature } from "@cucumber/messages";
import { type QuickPickleConfig } from '.';
export declare function renderGherkin(src: string, config: QuickPickleConfig, isMarkdown?: boolean): string;
export declare function renderFeature(feature: Feature, config: QuickPickleConfig): string;
/**
* Creates a 2d array of all possible combinations of the items in the input array
* @param arr A 2d array of strings
* @returns A 2d array of all possible combinations of the items in the input array
*/
export declare function explodeArray(arr: string[][]): string[][];
/**
* This function "explodes" any tags in the "explodeTags" setting and returns all possible
* combinations of all the tags. The theory is that it allows you to write one Scenario that
* runs multiple times in different ways; e.g. with and without JS or in different browsers.
*
* To take this case as an example, if the explodeTags are:
* ```
* [
* ['nojs', 'js'],
* ['firefox', 'chromium', 'webkit'],
* ]
* ```
*
* And the testTags are:
* ```
* ['nojs', 'js', 'snapshot']
* ```
*
* Then the function will return:
* ```
* [
* ['nojs', 'snapshot'],
* ['js', 'snapshot'],
* ]
* ```
*
* In that case, the test will be run twice.
*
* @param explodeTags the 2d array of tags that should be exploded
* @param testTags the tags to test against
* @returns a 2d array of all possible combinations of tags
*/
export declare function explodeTags(explodeTags: string[][], testTags: string[]): string[][];