UNPKG

1.13 kBTypeScriptView Raw
1/**
2 * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
6 */
7import type { Test } from '@jest/test-result';
8import type { Config } from '@jest/types';
9import type { Context } from 'jest-runtime';
10export declare type Stats = {
11 roots: number;
12 testMatch: number;
13 testPathIgnorePatterns: number;
14 testRegex: number;
15 testPathPattern?: number;
16};
17export declare type TestRunData = Array<{
18 context: Context;
19 matches: {
20 allTests: number;
21 tests: Array<Test>;
22 total?: number;
23 stats?: Stats;
24 };
25}>;
26export declare type TestPathCases = Array<{
27 stat: keyof Stats;
28 isMatch: (path: Config.Path) => boolean;
29}>;
30export declare type TestPathCasesWithPathPattern = TestPathCases & {
31 testPathPattern: (path: Config.Path) => boolean;
32};
33export declare type FilterResult = {
34 test: string;
35 message: string;
36};
37export declare type Filter = (testPaths: Array<string>) => Promise<{
38 filtered: Array<FilterResult>;
39}>;