github-pages-deploy-action/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.d.ts

52 lines
2.6 KiB
TypeScript
Raw Normal View History

2020-03-31 20:42:07 +08:00
/**
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/// <reference types="node" />
2020-04-30 20:40:07 +08:00
import type { Config, Global } from '@jest/types';
2020-03-31 20:42:07 +08:00
import type { JestEnvironment } from '@jest/environment';
import { TestResult } from '@jest/test-result';
2020-09-13 06:19:45 +08:00
import type { TestFileEvent } from 'jest-runner';
2020-06-27 02:01:06 +08:00
declare type Process = NodeJS.Process;
2020-09-13 06:19:45 +08:00
export declare const initialize: ({ config, environment, getPrettier, getBabelTraverse, globalConfig, localRequire, parentProcess, testPath, sendMessageToJest, }: {
2020-03-31 20:42:07 +08:00
config: Config.ProjectConfig;
environment: JestEnvironment;
2020-06-27 02:01:06 +08:00
getPrettier: () => null | any;
2020-03-31 20:42:07 +08:00
getBabelTraverse: () => Function;
globalConfig: Config.GlobalConfig;
2020-06-27 02:01:06 +08:00
localRequire: (path: Config.Path) => any;
testPath: Config.Path;
parentProcess: Process;
2020-09-13 06:19:45 +08:00
sendMessageToJest?: import("jest-runner/build/types").TestFileEvent<"test-file-start" | "test-file-success" | "test-file-failure" | "test-case-result"> | undefined;
2020-04-30 20:40:07 +08:00
}) => Promise<{
2020-03-31 20:42:07 +08:00
globals: {
2020-04-30 20:40:07 +08:00
afterAll: (fn: Global.TestFn, timeout?: number | undefined) => void;
afterEach: (fn: Global.TestFn, timeout?: number | undefined) => void;
beforeAll: (fn: Global.TestFn, timeout?: number | undefined) => void;
beforeEach: (fn: Global.TestFn, timeout?: number | undefined) => void;
2020-03-31 20:42:07 +08:00
describe: {
(blockName: string, blockFn: Global.BlockFn): void;
2020-09-13 06:19:45 +08:00
each: (table: Global.EachTable, ...taggedTemplateData: Global.TemplateData) => (title: string, test: Global.EachTestFn<Global.TestCallback>, timeout?: number | undefined) => void;
2020-03-31 20:42:07 +08:00
only: {
(blockName: string, blockFn: Global.BlockFn): void;
2020-09-13 06:19:45 +08:00
each: (table: Global.EachTable, ...taggedTemplateData: Global.TemplateData) => (title: string, test: Global.EachTestFn<Global.TestCallback>, timeout?: number | undefined) => void;
2020-03-31 20:42:07 +08:00
};
skip: {
(blockName: string, blockFn: Global.BlockFn): void;
2020-09-13 06:19:45 +08:00
each: (table: Global.EachTable, ...taggedTemplateData: Global.TemplateData) => (title: string, test: Global.EachTestFn<Global.TestCallback>, timeout?: number | undefined) => void;
2020-03-31 20:42:07 +08:00
};
};
it: Global.It;
test: Global.It;
};
snapshotState: import("jest-snapshot/build/State").default;
2020-04-30 20:40:07 +08:00
}>;
2020-03-31 20:42:07 +08:00
export declare const runAndTransformResultsToJestFormat: ({ config, globalConfig, testPath, }: {
config: Config.ProjectConfig;
globalConfig: Config.GlobalConfig;
testPath: string;
}) => Promise<TestResult>;
2020-06-27 02:01:06 +08:00
export {};