forked from eugene-manuilov/jest-runner-groups
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest-runner-groups.d.ts
39 lines (35 loc) · 1.87 KB
/
jest-runner-groups.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// jest-runner-groups.d.ts
import TestRunner from 'jest-runner';
declare class GroupRunner extends TestRunner {
/**
* Parses command line arguments to identify groups and regexes to include and exclude.
*
* @param {string[]} args - The command line arguments.
* @returns {Object} An object containing includeGroups, mustIncludeGroups, excludeGroups, includeRegexes, and excludeRegexes arrays.
*/
static getGroups(args: string[]): { include: string[], mustInclude: string[], exclude: string[] };
/**
* Filters tests based on specified groups and regexes.
*
* @param {Object} params - The parameters object.
* @param {string[]} params.include - Groups to include.
* @param {string[]} params.mustInclude - Groups that must be included.
* @param {string[]} params.exclude - Groups to exclude.
* @param {Object} test - The test object.
* @returns {boolean} True if the test should be included, false otherwise.
*/
static filterTest(params: { include: string[], mustInclude: string[], exclude: string[] }, test: any): boolean;
/**
* Runs all Jest tests after modifying process arguments with groups.
*
* @param {Object[]} tests - The list of tests to run.
* @param {Object} watcher - Jest's test watcher.
* @param {Function} onStart - Callback for when a test starts.
* @param {Function} onResult - Callback for when a test result is received.
* @param {Function} onFailure - Callback for when a test fails.
* @param {Object} options - Additional options for running the tests.
* @returns {Promise<void>} A promise that resolves when tests have completed running.
*/
runTests(tests: any[], watcher: any, onStart: (test: any) => void, onResult: (test: any, result: any) => void, onFailure: (test: any, error: any) => void, options: any): Promise<void>;
}
export = GroupRunner;