Socket
Socket
Sign inDemoInstall

@jest/types

Package Overview
Dependencies
Maintainers
6
Versions
97
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jest/types - npm Package Compare versions

Comparing version 27.5.1 to 28.0.0-alpha.0

1036

build/index.d.ts

@@ -7,7 +7,1031 @@ /**

*/
import type * as Circus from './Circus';
import type * as Config from './Config';
import type * as Global from './Global';
import type * as TestResult from './TestResult';
import type * as TransformTypes from './Transform';
export type { Circus, Config, Global, TestResult, TransformTypes };
/// <reference types="node" />
import type {Arguments} from 'yargs';
import type {CoverageMapData} from 'istanbul-lib-coverage';
import type {ForegroundColor} from 'chalk';
import type {ReportOptions} from 'istanbul-reports';
declare type Argv = Arguments<
Partial<{
all: boolean;
automock: boolean;
bail: boolean | number;
cache: boolean;
cacheDirectory: string;
changedFilesWithAncestor: boolean;
changedSince: string;
ci: boolean;
clearCache: boolean;
clearMocks: boolean;
collectCoverage: boolean;
collectCoverageFrom: string;
collectCoverageOnlyFrom: Array<string>;
color: boolean;
colors: boolean;
config: string;
coverage: boolean;
coverageDirectory: string;
coveragePathIgnorePatterns: Array<string>;
coverageReporters: Array<string>;
coverageThreshold: string;
debug: boolean;
env: string;
expand: boolean;
findRelatedTests: boolean;
forceExit: boolean;
globals: string;
globalSetup: string | null | undefined;
globalTeardown: string | null | undefined;
haste: string;
init: boolean;
injectGlobals: boolean;
json: boolean;
lastCommit: boolean;
logHeapUsage: boolean;
maxWorkers: number | string;
moduleDirectories: Array<string>;
moduleFileExtensions: Array<string>;
moduleNameMapper: string;
modulePathIgnorePatterns: Array<string>;
modulePaths: Array<string>;
noStackTrace: boolean;
notify: boolean;
notifyMode: string;
onlyChanged: boolean;
onlyFailures: boolean;
outputFile: string;
preset: string | null | undefined;
projects: Array<string>;
prettierPath: string | null | undefined;
resetMocks: boolean;
resetModules: boolean;
resolver: string | null | undefined;
restoreMocks: boolean;
rootDir: string;
roots: Array<string>;
runInBand: boolean;
selectProjects: Array<string>;
setupFiles: Array<string>;
setupFilesAfterEnv: Array<string>;
showConfig: boolean;
silent: boolean;
snapshotSerializers: Array<string>;
testEnvironment: string;
testEnvironmentOptions: string;
testFailureExitCode: string | null | undefined;
testMatch: Array<string>;
testNamePattern: string;
testPathIgnorePatterns: Array<string>;
testPathPattern: Array<string>;
testRegex: string | Array<string>;
testResultsProcessor: string;
testRunner: string;
testSequencer: string;
testURL: string;
testTimeout: number | null | undefined;
timers: string;
transform: string;
transformIgnorePatterns: Array<string>;
unmockedModulePathPatterns: Array<string> | null | undefined;
updateSnapshot: boolean;
useStderr: boolean;
verbose: boolean;
version: boolean;
watch: boolean;
watchAll: boolean;
watchman: boolean;
watchPathIgnorePatterns: Array<string>;
}>
>;
declare type ArrayTable = Table | Row;
declare type AssertionResult = {
ancestorTitles: Array<string>;
duration?: Milliseconds | null;
failureDetails: Array<unknown>;
failureMessages: Array<string>;
fullName: string;
invocations?: number;
location?: Callsite | null;
numPassingAsserts: number;
status: Status;
title: string;
};
declare type AsyncEvent =
| {
name: 'setup';
testNamePattern?: string;
runtimeGlobals: JestGlobals;
parentProcess: Process;
}
| {
name: 'include_test_location_in_result';
}
| {
name: 'hook_start';
hook: Hook;
}
| {
name: 'hook_success';
describeBlock?: DescribeBlock;
test?: TestEntry;
hook: Hook;
}
| {
name: 'hook_failure';
error: string | Exception;
describeBlock?: DescribeBlock;
test?: TestEntry;
hook: Hook;
}
| {
name: 'test_fn_start';
test: TestEntry;
}
| {
name: 'test_fn_success';
test: TestEntry;
}
| {
name: 'test_fn_failure';
error: Exception;
test: TestEntry;
}
| {
name: 'test_retry';
test: TestEntry;
}
| {
name: 'test_start';
test: TestEntry;
}
| {
name: 'test_skip';
test: TestEntry;
}
| {
name: 'test_todo';
test: TestEntry;
}
| {
name: 'test_done';
test: TestEntry;
}
| {
name: 'run_describe_start';
describeBlock: DescribeBlock;
}
| {
name: 'run_describe_finish';
describeBlock: DescribeBlock;
}
| {
name: 'run_start';
}
| {
name: 'run_finish';
}
| {
name: 'teardown';
};
declare type AsyncFn = TestFn_2 | HookFn_2;
declare type BlockFn = () => void;
declare type BlockFn_2 = Global.BlockFn;
declare type BlockMode = void | 'skip' | 'only' | 'todo';
declare type BlockName = string;
declare type BlockName_2 = Global.BlockName;
declare type Callsite = {
column: number;
line: number;
};
declare namespace Circus {
export {
DoneFn,
BlockFn_2 as BlockFn,
BlockName_2 as BlockName,
BlockMode,
TestMode,
TestName_2 as TestName,
TestFn_2 as TestFn,
HookFn_2 as HookFn,
AsyncFn,
SharedHookType,
HookType,
TestContext_2 as TestContext,
Exception,
FormattedError,
Hook,
EventHandler,
Event_2 as Event,
SyncEvent,
AsyncEvent,
MatcherResults,
TestStatus,
TestResult_2 as TestResult,
RunResult,
TestResults,
GlobalErrorHandlers,
State,
DescribeBlock,
TestError,
TestEntry,
};
}
export {Circus};
declare type Col = unknown;
declare type ConcurrentTestFn = () => TestReturnValuePromise;
declare namespace Config {
export {
Path,
Glob,
HasteConfig,
CoverageReporterName,
CoverageReporterWithOptions,
CoverageReporters,
ReporterConfig,
TransformerConfig,
ConfigGlobals,
PrettyFormatOptions,
DefaultOptions,
DisplayName,
InitialOptionsWithRootDir,
InitialProjectOptions,
InitialOptions,
SnapshotUpdateState,
CoverageThresholdValue,
GlobalConfig,
ProjectConfig,
Argv,
};
}
export {Config};
declare interface ConfigGlobals {
[K: string]: unknown;
}
declare type CoverageProvider = 'babel' | 'v8';
declare type CoverageReporterName = keyof ReportOptions;
declare type CoverageReporters = Array<
CoverageReporterName | CoverageReporterWithOptions
>;
declare type CoverageReporterWithOptions<K = CoverageReporterName> =
K extends CoverageReporterName
? ReportOptions[K] extends never
? never
: [K, Partial<ReportOptions[K]>]
: never;
declare type CoverageThreshold = {
[path: string]: CoverageThresholdValue;
global: CoverageThresholdValue;
};
declare type CoverageThresholdValue = {
branches?: number;
functions?: number;
lines?: number;
statements?: number;
};
declare type DefaultOptions = {
automock: boolean;
bail: number;
cache: boolean;
cacheDirectory: Path;
changedFilesWithAncestor: boolean;
ci: boolean;
clearMocks: boolean;
collectCoverage: boolean;
coveragePathIgnorePatterns: Array<string>;
coverageReporters: Array<CoverageReporterName>;
coverageProvider: CoverageProvider;
detectLeaks: boolean;
detectOpenHandles: boolean;
errorOnDeprecated: boolean;
expand: boolean;
extensionsToTreatAsEsm: Array<Path>;
forceCoverageMatch: Array<Glob>;
globals: ConfigGlobals;
haste: HasteConfig;
injectGlobals: boolean;
listTests: boolean;
maxConcurrency: number;
maxWorkers: number | string;
moduleDirectories: Array<string>;
moduleFileExtensions: Array<string>;
moduleNameMapper: Record<string, string | Array<string>>;
modulePathIgnorePatterns: Array<string>;
noStackTrace: boolean;
notify: boolean;
notifyMode: NotifyMode;
passWithNoTests: boolean;
prettierPath: string;
resetMocks: boolean;
resetModules: boolean;
restoreMocks: boolean;
roots: Array<Path>;
runTestsByPath: boolean;
runner: string;
setupFiles: Array<Path>;
setupFilesAfterEnv: Array<Path>;
skipFilter: boolean;
slowTestThreshold: number;
snapshotSerializers: Array<Path>;
testEnvironment: string;
testEnvironmentOptions: Record<string, unknown>;
testFailureExitCode: string | number;
testLocationInResults: boolean;
testMatch: Array<Glob>;
testPathIgnorePatterns: Array<string>;
testRegex: Array<string>;
testRunner: string;
testSequencer: string;
testURL: string;
timers: Timers;
transformIgnorePatterns: Array<Glob>;
useStderr: boolean;
watch: boolean;
watchPathIgnorePatterns: Array<string>;
watchman: boolean;
};
declare interface Describe extends DescribeBase {
only: DescribeBase;
skip: DescribeBase;
}
declare interface DescribeBase {
(blockName: BlockName, blockFn: BlockFn): void;
each: Each<BlockFn>;
}
declare type DescribeBlock = {
type: 'describeBlock';
children: Array<DescribeBlock | TestEntry>;
hooks: Array<Hook>;
mode: BlockMode;
name: BlockName_2;
parent?: DescribeBlock;
/** @deprecated Please get from `children` array instead */
tests: Array<TestEntry>;
};
declare type DisplayName = {
name: string;
color: typeof ForegroundColor;
};
declare type DoneFn = Global.DoneFn;
declare type DoneFn_2 = (reason?: string | Error) => void;
declare type DoneTakingTestFn = (
this: TestContext | undefined,
done: DoneFn_2,
) => ValidTestReturnValues;
declare type Each<EachCallback extends TestCallback> =
| ((
table: EachTable,
...taggedTemplateData: TemplateData
) => (
name: BlockName | TestName,
test: EachTestFn<EachCallback>,
timeout?: number,
) => void)
| (() => () => void);
declare type EachTable = ArrayTable | TemplateTable;
declare type EachTestFn<EachCallback extends TestCallback> = (
...args: ReadonlyArray<any>
) => ReturnType<EachCallback>;
declare type Event_2 = SyncEvent | AsyncEvent;
declare interface EventHandler {
(event: AsyncEvent, state: State): void | Promise<void>;
(event: SyncEvent, state: State): void;
}
declare type Exception = any;
declare type FormattedError = string;
declare type GeneratorReturningTestFn = (
this: TestContext | undefined,
) => TestReturnValueGenerator;
declare type Glob = string;
declare namespace Global {
export {
ValidTestReturnValues,
TestReturnValue,
TestContext,
DoneFn_2 as DoneFn,
DoneTakingTestFn,
PromiseReturningTestFn,
GeneratorReturningTestFn,
TestName,
TestFn,
ConcurrentTestFn,
BlockFn,
BlockName,
HookFn,
Col,
Row,
Table,
ArrayTable,
TemplateTable,
TemplateData,
EachTable,
TestCallback,
EachTestFn,
HookBase,
ItBase,
It,
ItConcurrentBase,
ItConcurrentExtended,
ItConcurrent,
DescribeBase,
Describe,
TestFrameworkGlobals,
GlobalAdditions,
Global_2 as Global,
};
}
export {Global};
declare interface Global_2
extends GlobalAdditions,
Omit<typeof globalThis, keyof GlobalAdditions> {
[extras: string]: unknown;
}
declare interface GlobalAdditions extends TestFrameworkGlobals {
__coverage__: CoverageMapData;
}
declare type GlobalConfig = {
bail: number;
changedSince?: string;
changedFilesWithAncestor: boolean;
collectCoverage: boolean;
collectCoverageFrom: Array<Glob>;
collectCoverageOnlyFrom?: {
[key: string]: boolean;
};
coverageDirectory: string;
coveragePathIgnorePatterns?: Array<string>;
coverageProvider: CoverageProvider;
coverageReporters: CoverageReporters;
coverageThreshold?: CoverageThreshold;
detectLeaks: boolean;
detectOpenHandles: boolean;
expand: boolean;
filter?: Path;
findRelatedTests: boolean;
forceExit: boolean;
json: boolean;
globalSetup?: string;
globalTeardown?: string;
lastCommit: boolean;
logHeapUsage: boolean;
listTests: boolean;
maxConcurrency: number;
maxWorkers: number;
noStackTrace: boolean;
nonFlagArgs: Array<string>;
noSCM?: boolean;
notify: boolean;
notifyMode: NotifyMode;
outputFile?: Path;
onlyChanged: boolean;
onlyFailures: boolean;
passWithNoTests: boolean;
projects: Array<Glob>;
replname?: string;
reporters?: Array<string | ReporterConfig>;
runTestsByPath: boolean;
rootDir: Path;
silent?: boolean;
skipFilter: boolean;
snapshotFormat: PrettyFormatOptions;
errorOnDeprecated: boolean;
testFailureExitCode: number;
testNamePattern?: string;
testPathPattern: string;
testResultsProcessor?: string;
testSequencer: string;
testTimeout?: number;
updateSnapshot: SnapshotUpdateState;
useStderr: boolean;
verbose?: boolean;
watch: boolean;
watchAll: boolean;
watchman: boolean;
watchPlugins?: Array<{
path: string;
config: Record<string, unknown>;
}> | null;
};
declare type GlobalErrorHandlers = {
uncaughtException: Array<(exception: Exception) => void>;
unhandledRejection: Array<
(exception: Exception, promise: Promise<unknown>) => void
>;
};
declare type HasteConfig = {
/** Whether to hash files using SHA-1. */
computeSha1?: boolean;
/** The platform to use as the default, e.g. 'ios'. */
defaultPlatform?: string | null;
/** Force use of Node's `fs` APIs rather than shelling out to `find` */
forceNodeFilesystemAPI?: boolean;
/**
* Whether to follow symlinks when crawling for files.
* This options cannot be used in projects which use watchman.
* Projects with `watchman` set to true will error if this option is set to true.
*/
enableSymlinks?: boolean;
/** Path to a custom implementation of Haste. */
hasteImplModulePath?: string;
/** All platforms to target, e.g ['ios', 'android']. */
platforms?: Array<string>;
/** Whether to throw on error on module collision. */
throwOnModuleCollision?: boolean;
/** Custom HasteMap module */
hasteMapModulePath?: string;
};
declare type Hook = {
asyncError: Error;
fn: HookFn_2;
type: HookType;
parent: DescribeBlock;
seenDone: boolean;
timeout: number | undefined | null;
};
declare interface HookBase {
(fn: HookFn, timeout?: number): void;
}
declare type HookFn = TestFn;
declare type HookFn_2 = Global.HookFn;
declare type HookType = SharedHookType | 'afterEach' | 'beforeEach';
declare type InitialOptions = Partial<{
automock: boolean;
bail: boolean | number;
cache: boolean;
cacheDirectory: Path;
ci: boolean;
clearMocks: boolean;
changedFilesWithAncestor: boolean;
changedSince: string;
collectCoverage: boolean;
collectCoverageFrom: Array<Glob>;
collectCoverageOnlyFrom: {
[key: string]: boolean;
};
coverageDirectory: string;
coveragePathIgnorePatterns: Array<string>;
coverageProvider: CoverageProvider;
coverageReporters: CoverageReporters;
coverageThreshold: CoverageThreshold;
dependencyExtractor: string;
detectLeaks: boolean;
detectOpenHandles: boolean;
displayName: string | DisplayName;
expand: boolean;
extensionsToTreatAsEsm: Array<Path>;
extraGlobals: Array<string>;
filter: Path;
findRelatedTests: boolean;
forceCoverageMatch: Array<Glob>;
forceExit: boolean;
json: boolean;
globals: ConfigGlobals;
globalSetup: string | null | undefined;
globalTeardown: string | null | undefined;
haste: HasteConfig;
injectGlobals: boolean;
reporters: Array<string | ReporterConfig>;
logHeapUsage: boolean;
lastCommit: boolean;
listTests: boolean;
maxConcurrency: number;
maxWorkers: number | string;
moduleDirectories: Array<string>;
moduleFileExtensions: Array<string>;
moduleLoader: Path;
moduleNameMapper: {
[key: string]: string | Array<string>;
};
modulePathIgnorePatterns: Array<string>;
modulePaths: Array<string>;
name: string;
noStackTrace: boolean;
notify: boolean;
notifyMode: string;
onlyChanged: boolean;
onlyFailures: boolean;
outputFile: Path;
passWithNoTests: boolean;
/**
* @deprecated Use `transformIgnorePatterns` options instead.
*/
preprocessorIgnorePatterns: Array<Glob>;
preset: string | null | undefined;
prettierPath: string | null | undefined;
projects: Array<Glob | InitialProjectOptions>;
replname: string | null | undefined;
resetMocks: boolean;
resetModules: boolean;
resolver: Path | null | undefined;
restoreMocks: boolean;
rootDir: Path;
roots: Array<Path>;
runner: string;
runTestsByPath: boolean;
/**
* @deprecated Use `transform` options instead.
*/
scriptPreprocessor: string;
setupFiles: Array<Path>;
/**
* @deprecated Use `setupFilesAfterEnv` options instead.
*/
setupTestFrameworkScriptFile: Path;
setupFilesAfterEnv: Array<Path>;
silent: boolean;
skipFilter: boolean;
skipNodeResolution: boolean;
slowTestThreshold: number;
snapshotResolver: Path;
snapshotSerializers: Array<Path>;
snapshotFormat: PrettyFormatOptions;
errorOnDeprecated: boolean;
testEnvironment: string;
testEnvironmentOptions: Record<string, unknown>;
testFailureExitCode: string | number;
testLocationInResults: boolean;
testMatch: Array<Glob>;
testNamePattern: string;
/**
* @deprecated Use `roots` options instead.
*/
testPathDirs: Array<Path>;
testPathIgnorePatterns: Array<string>;
testRegex: string | Array<string>;
testResultsProcessor: string;
testRunner: string;
testSequencer: string;
testURL: string;
testTimeout: number;
timers: Timers;
transform: {
[regex: string]: Path | TransformerConfig;
};
transformIgnorePatterns: Array<Glob>;
watchPathIgnorePatterns: Array<string>;
unmockedModulePathPatterns: Array<string>;
updateSnapshot: boolean;
useStderr: boolean;
verbose?: boolean;
watch: boolean;
watchAll: boolean;
watchman: boolean;
watchPlugins: Array<string | [string, Record<string, unknown>]>;
}>;
declare type InitialOptionsWithRootDir = InitialOptions &
Required<Pick<InitialOptions, 'rootDir'>>;
declare type InitialProjectOptions = Pick<
InitialOptions & {
cwd?: string;
},
keyof ProjectConfig
>;
declare interface It extends ItBase {
only: ItBase;
skip: ItBase;
todo: (testName: TestName) => void;
}
declare interface ItBase {
(testName: TestName, fn: TestFn, timeout?: number): void;
each: Each<TestFn>;
}
declare interface ItConcurrent extends It {
concurrent: ItConcurrentExtended;
}
declare interface ItConcurrentBase {
(testName: TestName, testFn: ConcurrentTestFn, timeout?: number): void;
each: Each<ConcurrentTestFn>;
}
declare interface ItConcurrentExtended extends ItConcurrentBase {
only: ItConcurrentBase;
skip: ItConcurrentBase;
}
declare interface JestGlobals extends Global.TestFrameworkGlobals {
expect: unknown;
}
declare type MatcherResults = {
actual: unknown;
expected: unknown;
name: string;
pass: boolean;
};
declare type Milliseconds = number;
declare type NotifyMode =
| 'always'
| 'failure'
| 'success'
| 'change'
| 'success-change'
| 'failure-change';
declare type Path = string;
declare interface PrettyFormatOptions {}
declare type Process = NodeJS.Process;
declare type ProjectConfig = {
automock: boolean;
cache: boolean;
cacheDirectory: Path;
clearMocks: boolean;
coveragePathIgnorePatterns: Array<string>;
cwd: Path;
dependencyExtractor?: string;
detectLeaks: boolean;
detectOpenHandles: boolean;
displayName?: DisplayName;
errorOnDeprecated: boolean;
extensionsToTreatAsEsm: Array<Path>;
extraGlobals: Array<keyof typeof globalThis>;
filter?: Path;
forceCoverageMatch: Array<Glob>;
globalSetup?: string;
globalTeardown?: string;
globals: ConfigGlobals;
haste: HasteConfig;
injectGlobals: boolean;
moduleDirectories: Array<string>;
moduleFileExtensions: Array<string>;
moduleLoader?: Path;
moduleNameMapper: Array<[string, string]>;
modulePathIgnorePatterns: Array<string>;
modulePaths?: Array<string>;
name: string;
prettierPath: string;
resetMocks: boolean;
resetModules: boolean;
resolver?: Path;
restoreMocks: boolean;
rootDir: Path;
roots: Array<Path>;
runner: string;
setupFiles: Array<Path>;
setupFilesAfterEnv: Array<Path>;
skipFilter: boolean;
skipNodeResolution?: boolean;
slowTestThreshold: number;
snapshotResolver?: Path;
snapshotSerializers: Array<Path>;
snapshotFormat: PrettyFormatOptions;
testEnvironment: string;
testEnvironmentOptions: Record<string, unknown>;
testMatch: Array<Glob>;
testLocationInResults: boolean;
testPathIgnorePatterns: Array<string>;
testRegex: Array<string | RegExp>;
testRunner: string;
testURL: string;
timers: Timers;
transform: Array<[string, Path, Record<string, unknown>]>;
transformIgnorePatterns: Array<Glob>;
watchPathIgnorePatterns: Array<string>;
unmockedModulePathPatterns?: Array<string>;
};
declare type PromiseReturningTestFn = (
this: TestContext | undefined,
) => TestReturnValue;
declare type ReporterConfig = [string, Record<string, unknown>];
declare type Row = ReadonlyArray<Col>;
declare type RunResult = {
unhandledErrors: Array<FormattedError>;
testResults: TestResults;
};
declare type SerializableError = {
code?: unknown;
message: string;
stack: string | null | undefined;
type?: string;
};
declare type SharedHookType = 'afterAll' | 'beforeAll';
declare type SnapshotUpdateState = 'all' | 'new' | 'none';
declare type State = {
currentDescribeBlock: DescribeBlock;
currentlyRunningTest?: TestEntry | null;
expand?: boolean;
hasFocusedTests: boolean;
hasStarted: boolean;
originalGlobalErrorHandlers?: GlobalErrorHandlers;
parentProcess: Process | null;
rootDescribeBlock: DescribeBlock;
testNamePattern?: RegExp | null;
testTimeout: number;
unhandledErrors: Array<Exception>;
includeTestLocationInResult: boolean;
};
declare type Status =
| 'passed'
| 'failed'
| 'skipped'
| 'pending'
| 'todo'
| 'disabled';
declare type SyncEvent =
| {
asyncError: Error;
mode: BlockMode;
name: 'start_describe_definition';
blockName: BlockName_2;
}
| {
mode: BlockMode;
name: 'finish_describe_definition';
blockName: BlockName_2;
}
| {
asyncError: Error;
name: 'add_hook';
hookType: HookType;
fn: HookFn_2;
timeout: number | undefined;
}
| {
asyncError: Error;
name: 'add_test';
testName: TestName_2;
fn: TestFn_2;
mode?: TestMode;
timeout: number | undefined;
}
| {
name: 'error';
error: Exception;
};
declare type Table = ReadonlyArray<Row>;
declare type TemplateData = ReadonlyArray<unknown>;
declare type TemplateTable = TemplateStringsArray;
declare type TestCallback = BlockFn | TestFn | ConcurrentTestFn;
declare type TestContext = Record<string, unknown>;
declare type TestContext_2 = Global.TestContext;
declare type TestEntry = {
type: 'test';
asyncError: Exception;
errors: Array<TestError>;
fn: TestFn_2;
invocations: number;
mode: TestMode;
name: TestName_2;
parent: DescribeBlock;
startedAt?: number | null;
duration?: number | null;
seenDone: boolean;
status?: TestStatus | null;
timeout?: number;
};
declare type TestError = Exception | [Exception | undefined, Exception];
declare type TestFn =
| PromiseReturningTestFn
| GeneratorReturningTestFn
| DoneTakingTestFn;
declare type TestFn_2 = Global.TestFn;
declare interface TestFrameworkGlobals {
it: ItConcurrent;
test: ItConcurrent;
fit: ItBase & {
concurrent?: ItConcurrentBase;
};
xit: ItBase;
xtest: ItBase;
describe: Describe;
xdescribe: DescribeBase;
fdescribe: DescribeBase;
beforeAll: HookBase;
beforeEach: HookBase;
afterEach: HookBase;
afterAll: HookBase;
}
declare type TestMode = BlockMode;
declare type TestName = string;
declare type TestName_2 = Global.TestName;
declare namespace TestResult {
export {Milliseconds, AssertionResult, SerializableError};
}
export {TestResult};
declare type TestResult_2 = {
duration?: number | null;
errors: Array<FormattedError>;
errorsDetailed: Array<MatcherResults | unknown>;
invocations: number;
status: TestStatus;
location?: {
column: number;
line: number;
} | null;
testPath: Array<TestName_2 | BlockName_2>;
};
declare type TestResults = Array<TestResult_2>;
declare type TestReturnValue = ValidTestReturnValues | TestReturnValuePromise;
declare type TestReturnValueGenerator = Generator<void, unknown, void>;
declare type TestReturnValuePromise = Promise<unknown>;
declare type TestStatus = 'skip' | 'done' | 'todo';
declare type Timers = 'real' | 'fake' | 'modern' | 'legacy';
declare type TransformerConfig = [string, Record<string, unknown>];
declare type TransformResult = {
code: string;
originalCode: string;
sourceMapPath: string | null;
};
declare namespace TransformTypes {
export {TransformResult};
}
export {TransformTypes};
declare type ValidTestReturnValues = void | undefined;
export {};

10

package.json
{
"name": "@jest/types",
"version": "27.5.1",
"version": "28.0.0-alpha.0",
"repository": {

@@ -10,3 +10,3 @@ "type": "git",

"engines": {
"node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
"node": "^12.13.0 || ^14.15.0 || ^16.13.0 || >=17.0.0"
},

@@ -27,7 +27,7 @@ "license": "MIT",

"@types/node": "*",
"@types/yargs": "^16.0.0",
"@types/yargs": "^17.0.8",
"chalk": "^4.0.0"
},
"devDependencies": {
"@tsd/typescript": "~4.1.5",
"@tsd/typescript": "~4.5.5",
"tsd-lite": "^0.5.1"

@@ -38,3 +38,3 @@ },

},
"gitHead": "67c1aa20c5fec31366d733e901fee2b981cb1850"
"gitHead": "89275b08977065d98e42ad71fcf223f4ad169f09"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc