id int64 0 3.78k | code stringlengths 13 37.9k | declarations stringlengths 16 64.6k |
|---|---|---|
1,700 | async (test: Test, testResult: TestResult) => {
if (watcher.isInterrupted()) {
return Promise.resolve();
}
if (testResult.testResults.length === 0) {
const message = 'Your test suite must contain at least one test.';
return onFailure(test, {
message,
stack... | type Test = {
context: TestContext;
duration?: number;
path: string;
}; |
1,701 | async (test: Test, testResult: TestResult) => {
if (watcher.isInterrupted()) {
return Promise.resolve();
}
if (testResult.testResults.length === 0) {
const message = 'Your test suite must contain at least one test.';
return onFailure(test, {
message,
stack... | type Test = (arg0: any) => boolean; |
1,702 | async (test: Test, testResult: TestResult) => {
if (watcher.isInterrupted()) {
return Promise.resolve();
}
if (testResult.testResults.length === 0) {
const message = 'Your test suite must contain at least one test.';
return onFailure(test, {
message,
stack... | type TestResult = {
console?: ConsoleBuffer;
coverage?: CoverageMapData;
displayName?: Config.DisplayName;
failureMessage?: string | null;
leaks: boolean;
memoryUsage?: number;
numFailingTests: number;
numPassingTests: number;
numPendingTests: number;
numTodoTests: number;
openHandles: Array<Error... |
1,703 | async (test: Test, testResult: TestResult) => {
if (watcher.isInterrupted()) {
return Promise.resolve();
}
if (testResult.testResults.length === 0) {
const message = 'Your test suite must contain at least one test.';
return onFailure(test, {
message,
stack... | type TestResult = {
duration?: number | null;
errors: Array<FormattedError>;
errorsDetailed: Array<MatcherResults | unknown>;
invocations: number;
status: TestStatus;
location?: {column: number; line: number} | null;
numPassingAsserts: number;
retryReasons: Array<FormattedError>;
testPath: Array<TestN... |
1,704 | async (test: Test, error: SerializableError) => {
if (watcher.isInterrupted()) {
return;
}
const testResult = buildFailureTestResult(test.path, error);
testResult.failureMessage = formatExecError(
testResult.testExecError,
test.context.config,
this._globalConfig,
... | type Test = {
context: TestContext;
duration?: number;
path: string;
}; |
1,705 | async (test: Test, error: SerializableError) => {
if (watcher.isInterrupted()) {
return;
}
const testResult = buildFailureTestResult(test.path, error);
testResult.failureMessage = formatExecError(
testResult.testExecError,
test.context.config,
this._globalConfig,
... | type Test = (arg0: any) => boolean; |
1,706 | async (test: Test, error: SerializableError) => {
if (watcher.isInterrupted()) {
return;
}
const testResult = buildFailureTestResult(test.path, error);
testResult.failureMessage = formatExecError(
testResult.testExecError,
test.context.config,
this._globalConfig,
... | type SerializableError = TestResult.SerializableError; |
1,707 | async (test: Test, error: SerializableError) => {
if (watcher.isInterrupted()) {
return;
}
const testResult = buildFailureTestResult(test.path, error);
testResult.failureMessage = formatExecError(
testResult.testExecError,
test.context.config,
this._globalConfig,
... | type SerializableError = {
code?: unknown;
message: string;
stack: string | null | undefined;
type?: string;
}; |
1,708 | function getNoTestFoundVerbose(
testRunData: TestRunData,
globalConfig: Config.GlobalConfig,
willExitWith0: boolean,
): string {
const individualResults = testRunData.map(testRun => {
const stats = testRun.matches.stats || ({} as Stats);
const config = testRun.context.config;
const statsMessage = (O... | type TestRunData = Array<{
context: TestContext;
matches: {
allTests: number;
tests: Array<Test>;
total?: number;
stats?: Stats;
};
}>; |
1,709 | (failure?: AssertionLocation) => void | type AssertionLocation = {
fullName: string;
path: string;
}; |
1,710 | updateWithResults(results: AggregatedResult): void {
if (!results.snapshot.failure && results.numFailedTests > 0) {
return this._drawUIOverlay();
}
this._testAssertions.shift();
if (this._testAssertions.length === 0) {
return this._drawUIOverlay();
}
// Go to the next test
retu... | type AggregatedResult = AggregatedResultWithoutCoverage & {
coverageMap?: CoverageMap | null;
}; |
1,711 | updateWithResults(results: AggregatedResult): void {
const hasSnapshotFailure = !!results.snapshot.failure;
if (hasSnapshotFailure) {
this._drawUIOverlay();
return;
}
this._testAssertions.shift();
if (this._testAssertions.length - this._skippedNum === 0) {
this._drawUIOverlay();
... | type AggregatedResult = AggregatedResultWithoutCoverage & {
coverageMap?: CoverageMap | null;
}; |
1,712 | function getNoTestsFoundMessage(
testRunData: TestRunData,
globalConfig: Config.GlobalConfig,
): {exitWith0: boolean; message: string} {
const exitWith0 =
globalConfig.passWithNoTests ||
globalConfig.lastCommit ||
globalConfig.onlyChanged;
if (globalConfig.onlyFailures) {
return {exitWith0, mes... | type TestRunData = Array<{
context: TestContext;
matches: {
allTests: number;
tests: Array<Test>;
total?: number;
stats?: Stats;
};
}>; |
1,713 | (context: TestContext, tests: Array<string>) =>
tests.map(path => ({
context,
duration: undefined,
path,
})) | type TestContext = {
config: Config.ProjectConfig;
hasteFS: IHasteFS;
moduleMap: IModuleMap;
resolver: Resolver;
}; |
1,714 | (context: TestContext, tests: Array<string>) =>
tests.map(path => ({
context,
duration: undefined,
path,
})) | type TestContext = Record<string, unknown>; |
1,715 | (context: TestContext, tests: Array<string>) =>
tests.map(path => ({
context,
duration: undefined,
path,
})) | type TestContext = Global.TestContext; |
1,716 | (changedFilesInfo: ChangedFiles) => {
const {repos} = changedFilesInfo;
// no SCM (git/hg/...) is found in any of the roots.
const noSCM = Object.values(repos).every(scm => scm.size === 0);
return !noSCM;
} | type ChangedFiles = {repos: Repos; changedFiles: Paths}; |
1,717 | constructor(context: TestContext) {
const {config} = context;
this._context = context;
this._dependencyResolver = null;
const rootPattern = new RegExp(
config.roots.map(dir => escapePathForRegex(dir + path.sep)).join('|'),
);
this._testPathCases.push({
isMatch: path => rootPattern.t... | type TestContext = {
config: Config.ProjectConfig;
hasteFS: IHasteFS;
moduleMap: IModuleMap;
resolver: Resolver;
}; |
1,718 | constructor(context: TestContext) {
const {config} = context;
this._context = context;
this._dependencyResolver = null;
const rootPattern = new RegExp(
config.roots.map(dir => escapePathForRegex(dir + path.sep)).join('|'),
);
this._testPathCases.push({
isMatch: path => rootPattern.t... | type TestContext = Record<string, unknown>; |
1,719 | constructor(context: TestContext) {
const {config} = context;
this._context = context;
this._dependencyResolver = null;
const rootPattern = new RegExp(
config.roots.map(dir => escapePathForRegex(dir + path.sep)).join('|'),
);
this._testPathCases.push({
isMatch: path => rootPattern.t... | type TestContext = Global.TestContext; |
1,720 | async findTestRelatedToChangedFiles(
changedFilesInfo: ChangedFiles,
collectCoverage: boolean,
): Promise<SearchResult> {
if (!hasSCM(changedFilesInfo)) {
return {noSCM: true, tests: []};
}
const {changedFiles} = changedFilesInfo;
return this.findRelatedTests(changedFiles, collectCoverag... | type ChangedFiles = {repos: Repos; changedFiles: Paths}; |
1,721 | async findRelatedSourcesFromTestsInChangedFiles(
changedFilesInfo: ChangedFiles,
): Promise<Array<string>> {
if (!hasSCM(changedFilesInfo)) {
return [];
}
const {changedFiles} = changedFilesInfo;
const dependencyResolver = await this._getOrBuildDependencyResolver();
const relatedSourcesS... | type ChangedFiles = {repos: Repos; changedFiles: Paths}; |
1,722 | function getNoTestFound(
testRunData: TestRunData,
globalConfig: Config.GlobalConfig,
willExitWith0: boolean,
): string {
const testFiles = testRunData.reduce(
(current, testRun) => current + (testRun.matches.total || 0),
0,
);
let dataMessage;
if (globalConfig.runTestsByPath) {
dataMessage =... | type TestRunData = Array<{
context: TestContext;
matches: {
allTests: number;
tests: Array<Test>;
total?: number;
stats?: Stats;
};
}>; |
1,723 | (results: AggregatedResult) => void | undefined | type AggregatedResult = AggregatedResultWithoutCoverage & {
coverageMap?: CoverageMap | null;
}; |
1,724 | override apply(hooks: JestHookSubscriber): void {
hooks.onTestRunComplete(results => {
this._failedTestAssertions = this.getFailedTestAssertions(results);
if (this._manager.isActive()) this._manager.updateWithResults(results);
});
} | type JestHookSubscriber = {
onFileChange: (fn: FileChange) => void;
onTestRunComplete: (fn: TestRunComplete) => void;
shouldRunTestSuite: (fn: ShouldRunTestSuite) => void;
}; |
1,725 | private getFailedTestAssertions(
results: AggregatedResult,
): Array<AssertionLocation> {
const failedTestPaths: Array<AssertionLocation> = [];
if (
// skip if no failed tests
results.numFailedTests === 0 ||
// skip if missing test results
!results.testResults ||
// skip if ... | type AggregatedResult = AggregatedResultWithoutCoverage & {
coverageMap?: CoverageMap | null;
}; |
1,726 | getFailedSnapshotTestAssertions(
testResults: AggregatedResult,
): Array<AssertionLocation> {
const failedTestPaths: Array<AssertionLocation> = [];
if (testResults.numFailedTests === 0 || !testResults.testResults) {
return failedTestPaths;
}
testResults.testResults.forEach(testResult => {
... | type AggregatedResult = AggregatedResultWithoutCoverage & {
coverageMap?: CoverageMap | null;
}; |
1,727 | override apply(hooks: JestHookSubscriber): void {
hooks.onTestRunComplete(results => {
this._failedSnapshotTestAssertions =
this.getFailedSnapshotTestAssertions(results);
if (this._snapshotInteractiveMode.isActive()) {
this._snapshotInteractiveMode.updateWithResults(results);
}
... | type JestHookSubscriber = {
onFileChange: (fn: FileChange) => void;
onTestRunComplete: (fn: TestRunComplete) => void;
shouldRunTestSuite: (fn: ShouldRunTestSuite) => void;
}; |
1,728 | override apply(hooks: JestHookSubscriber): void {
hooks.onTestRunComplete(results => {
this._hasSnapshotFailure = results.snapshot.failure;
});
} | type JestHookSubscriber = {
onFileChange: (fn: FileChange) => void;
onTestRunComplete: (fn: TestRunComplete) => void;
shouldRunTestSuite: (fn: ShouldRunTestSuite) => void;
}; |
1,729 | (a: WatchPlugin, b: WatchPlugin) => {
if (a.isInternal && b.isInternal) {
// internal plugins in the order we specify them
return 0;
}
if (a.isInternal !== b.isInternal) {
// external plugins afterwards
return a.isInternal ? -1 : 1;
}
const usageInfoA = a.g... | interface WatchPlugin {
isInternal?: boolean;
apply?: (hooks: JestHookSubscriber) => void;
getUsageInfo?: (globalConfig: Config.GlobalConfig) => UsageData | null;
onKey?: (value: string) => void;
run?: (
globalConfig: Config.GlobalConfig,
updateConfigAndRun: UpdateConfigCallback,
) => Promise<void |... |
1,730 | (
this: Context,
actual: unknown,
...expected: Expected
) => ExpectationResult | type Context = {
object: unknown;
args: Array<unknown>;
returnValue?: unknown;
}; |
1,731 | (
this: Context,
actual: unknown,
...expected: Expected
) => ExpectationResult | interface Context extends MatcherContext {
snapshotState: SnapshotState;
} |
1,732 | (this: Context, actual: any, ...expected: Array<any>): ExpectationResult | type Context = {
object: unknown;
args: Array<unknown>;
returnValue?: unknown;
}; |
1,733 | (this: Context, actual: any, ...expected: Array<any>): ExpectationResult | interface Context extends MatcherContext {
snapshotState: SnapshotState;
} |
1,734 | extend(matchers: MatchersObject): void | type MatchersObject = {
[name: string]: RawMatcherFn;
}; |
1,735 | function (
matcher: RawMatcherFn,
) {
return function (
this: MatcherContext,
received: any,
testNameOrInlineSnapshot?: string,
) {
return matcher.apply(this, [received, testNameOrInlineSnapshot, true]);
};
} | type RawMatcherFn<Context extends MatcherContext = MatcherContext> = {
(this: Context, actual: any, ...expected: Array<any>): ExpectationResult;
/** @internal */
[INTERNAL_MATCHER_FLAG]?: boolean;
}; |
1,736 | function (
this: MatcherContext,
received: any,
testNameOrInlineSnapshot?: string,
) {
return matcher.apply(this, [received, testNameOrInlineSnapshot, true]);
} | type MatcherContext = MatcherUtils & Readonly<MatcherState>; |
1,737 | (
matcher: RawMatcherFn,
isNot: boolean,
promise: string,
actual: any,
err?: JestAssertionError,
): ThrowingMatcherFn =>
function throwingMatcher(...args): any {
let throws = true;
const utils: MatcherUtils['utils'] = {
...matcherUtils,
iterableEquality,
subsetEquality,
};
... | type RawMatcherFn<Context extends MatcherContext = MatcherContext> = {
(this: Context, actual: any, ...expected: Array<any>): ExpectationResult;
/** @internal */
[INTERNAL_MATCHER_FLAG]?: boolean;
}; |
1,738 | (
matcher: RawMatcherFn,
isNot: boolean,
promise: string,
actual: any,
err?: JestAssertionError,
): ThrowingMatcherFn =>
function throwingMatcher(...args): any {
let throws = true;
const utils: MatcherUtils['utils'] = {
...matcherUtils,
iterableEquality,
subsetEquality,
};
... | class JestAssertionError extends Error {
matcherResult?: Omit<SyncExpectationResult, 'message'> & {message: string};
} |
1,739 | (
result: SyncExpectationResult,
asyncError?: JestAssertionError,
) => {
_validateResult(result);
getState().assertionCalls++;
if ((result.pass && isNot) || (!result.pass && !isNot)) {
// XOR
const message = getMessage(result.message);
let error;
if (... | type SyncExpectationResult = {
pass: boolean;
message(): string;
}; |
1,740 | (
result: SyncExpectationResult,
asyncError?: JestAssertionError,
) => {
_validateResult(result);
getState().assertionCalls++;
if ((result.pass && isNot) || (!result.pass && !isNot)) {
// XOR
const message = getMessage(result.message);
let error;
if (... | class JestAssertionError extends Error {
matcherResult?: Omit<SyncExpectationResult, 'message'> & {message: string};
} |
1,741 | (matchers: MatchersObject) =>
setMatchers(matchers, false, expect) | type MatchersObject = {
[name: string]: RawMatcherFn;
}; |
1,742 | (
matchers: MatchersObject,
isInternal: boolean,
expect: Expect,
): void => {
Object.keys(matchers).forEach(key => {
const matcher = matchers[key];
if (typeof matcher !== 'function') {
throw new TypeError(
`expect.extend: \`${key}\` is not a valid matcher. Must be a function, is "${getTyp... | type MatchersObject = {
[name: string]: RawMatcherFn;
}; |
1,743 | (
matchers: MatchersObject,
isInternal: boolean,
expect: Expect,
): void => {
Object.keys(matchers).forEach(key => {
const matcher = matchers[key];
if (typeof matcher !== 'function') {
throw new TypeError(
`expect.extend: \`${key}\` is not a valid matcher. Must be a function, is "${getTyp... | type Expect = {
<T = unknown>(actual: T): Matchers<void, T> &
Inverse<Matchers<void, T>> &
PromiseMatchers<T>;
} & BaseExpect &
AsymmetricMatchers &
Inverse<Omit<AsymmetricMatchers, 'any' | 'anything'>>; |
1,744 | toContainEqual(received: ContainIterable, expected: unknown) {
const matcherName = 'toContainEqual';
const isNot = this.isNot;
const options: MatcherHintOptions = {
comment: 'deep equality',
isNot,
promise: this.promise,
};
if (received == null) {
throw new Error(
ma... | type ContainIterable =
| Array<unknown>
| Set<unknown>
| NodeListOf<Node>
| DOMTokenList
| HTMLCollectionOf<any>; |
1,745 | toEqualBook(expected: Book): R | class Book {
public name: string;
public authors: Array<Author>;
public [CONNECTION_PROP]: DbConnection;
constructor(name: string, authors: Array<Author>) {
this.name = name;
this.authors = authors;
this[CONNECTION_PROP] = DbConnectionId++;
}
} |
1,746 | toEqualBook(expected: Book, actual: Book) {
const result = this.equals(expected, actual, this.customTesters);
return {
message: () =>
`Expected Book object: ${expected.name}. Actual Book object: ${actual.name}`,
pass: result,
};
} | class Book {
public name: string;
public authors: Array<Author>;
public [CONNECTION_PROP]: DbConnection;
constructor(name: string, authors: Array<Author>) {
this.name = name;
this.authors = authors;
this[CONNECTION_PROP] = DbConnectionId++;
}
} |
1,747 | equals(other: Volume): boolean {
if (this.unit === other.unit) {
return this.amount === other.amount;
} else if (this.unit === 'L' && other.unit === 'mL') {
return this.amount * 1000 === other.amount;
} else {
return this.amount === other.amount * 1000;
}
} | class Volume {
public amount: number;
public unit: 'L' | 'mL';
constructor(amount: number, unit: 'L' | 'mL') {
this.amount = amount;
this.unit = unit;
}
toString(): string {
return `[Volume ${this.amount}${this.unit}]`;
}
equals(other: Volume): boolean {
if (this.unit === other.unit) {
... |
1,748 | toEqualVolume(expected: Volume): R | class Volume {
public amount: number;
public unit: 'L' | 'mL';
constructor(amount: number, unit: 'L' | 'mL') {
this.amount = amount;
this.unit = unit;
}
toString(): string {
return `[Volume ${this.amount}${this.unit}]`;
}
equals(other: Volume): boolean {
if (this.unit === other.unit) {
... |
1,749 | toEqualVolume(expected: Volume, actual: Volume) {
const result = this.equals(expected, actual, this.customTesters);
return {
message: () =>
`Expected Volume object: ${expected.toString()}. Actual Volume object: ${actual.toString()}`,
pass: result,
};
} | class Volume {
public amount: number;
public unit: 'L' | 'mL';
constructor(amount: number, unit: 'L' | 'mL') {
this.amount = amount;
this.unit = unit;
}
toString(): string {
return `[Volume ${this.amount}${this.unit}]`;
}
equals(other: Volume): boolean {
if (this.unit === other.unit) {
... |
1,750 | (
this: MatcherContext,
actual: unknown,
floor: number,
ceiling: number,
) => any | type MatcherContext = MatcherUtils & Readonly<MatcherState>; |
1,751 | (this: MatcherContext, actual: unknown) => any | type MatcherContext = MatcherUtils & Readonly<MatcherState>; |
1,752 | (
this: CustomContext,
actual: unknown,
count: number,
) => any | interface CustomContext extends MatcherContext {
customMethod(): void;
} |
1,753 | (
this: TestContext,
done: DoneFn,
) => ValidTestReturnValues | type TestContext = {
config: Config.ProjectConfig;
hasteFS: IHasteFS;
moduleMap: IModuleMap;
resolver: Resolver;
}; |
1,754 | (
this: TestContext,
done: DoneFn,
) => ValidTestReturnValues | type TestContext = Record<string, unknown>; |
1,755 | (
this: TestContext,
done: DoneFn,
) => ValidTestReturnValues | type TestContext = Global.TestContext; |
1,756 | (
this: TestContext,
done: DoneFn,
) => ValidTestReturnValues | interface DoneFn {
(error?: any): void;
fail: (error: Error) => void;
} |
1,757 | (
this: TestContext,
done: DoneFn,
) => ValidTestReturnValues | type DoneFn = (reason?: string | Error) => void; |
1,758 | (
this: TestContext,
done: DoneFn,
) => ValidTestReturnValues | type DoneFn = Global.DoneFn; |
1,759 | (this: TestContext) => TestReturnValue | type TestContext = {
config: Config.ProjectConfig;
hasteFS: IHasteFS;
moduleMap: IModuleMap;
resolver: Resolver;
}; |
1,760 | (this: TestContext) => TestReturnValue | type TestContext = Record<string, unknown>; |
1,761 | (this: TestContext) => TestReturnValue | type TestContext = Global.TestContext; |
1,762 | (
this: TestContext,
) => TestReturnValueGenerator | type TestContext = {
config: Config.ProjectConfig;
hasteFS: IHasteFS;
moduleMap: IModuleMap;
resolver: Resolver;
}; |
1,763 | (
this: TestContext,
) => TestReturnValueGenerator | type TestContext = Record<string, unknown>; |
1,764 | (
this: TestContext,
) => TestReturnValueGenerator | type TestContext = Global.TestContext; |
1,765 | (arg: T, done: DoneFn) => ReturnType<EachFn> | interface DoneFn {
(error?: any): void;
fail: (error: Error) => void;
} |
1,766 | (arg: T, done: DoneFn) => ReturnType<EachFn> | type DoneFn = (reason?: string | Error) => void; |
1,767 | (arg: T, done: DoneFn) => ReturnType<EachFn> | type DoneFn = Global.DoneFn; |
1,768 | (fn: HookFn, timeout?: number): void | type HookFn = TestFn; |
1,769 | (fn: HookFn, timeout?: number): void | type HookFn = Global.HookFn; |
1,770 | (testName: TestNameLike, fn: T, timeout?: number): void | type TestNameLike = TestName | NameLike; |
1,771 | (testName: TestNameLike, fn: T, timeout?: number): void | type TestNameLike = Global.TestNameLike; |
1,772 | (testName: TestNameLike, fn: TestFn, timeout?: number): void | type TestNameLike = TestName | NameLike; |
1,773 | (testName: TestNameLike, fn: TestFn, timeout?: number): void | type TestNameLike = Global.TestNameLike; |
1,774 | (testName: TestNameLike, fn: TestFn, timeout?: number): void | type TestFn =
| PromiseReturningTestFn
| GeneratorReturningTestFn
| DoneTakingTestFn; |
1,775 | (testName: TestNameLike, fn: TestFn, timeout?: number): void | type TestFn = Global.TestFn; |
1,776 | (testName: TestNameLike) => void | type TestNameLike = TestName | NameLike; |
1,777 | (testName: TestNameLike) => void | type TestNameLike = Global.TestNameLike; |
1,778 | (testName: TestNameLike, testFn: ConcurrentTestFn, timeout?: number): void | type TestNameLike = TestName | NameLike; |
1,779 | (testName: TestNameLike, testFn: ConcurrentTestFn, timeout?: number): void | type TestNameLike = Global.TestNameLike; |
1,780 | (testName: TestNameLike, testFn: ConcurrentTestFn, timeout?: number): void | type ConcurrentTestFn = () => TestReturnValuePromise; |
1,781 | (testName: TestNameLike, testFn: ConcurrentTestFn, timeout?: number): void | type ConcurrentTestFn = Global.ConcurrentTestFn; |
1,782 | (blockName: BlockNameLike, blockFn: BlockFn): void | type BlockNameLike = BlockName | NameLike; |
1,783 | (blockName: BlockNameLike, blockFn: BlockFn): void | type BlockNameLike = Global.BlockNameLike; |
1,784 | (blockName: BlockNameLike, blockFn: BlockFn): void | type BlockFn = () => void; |
1,785 | (blockName: BlockNameLike, blockFn: BlockFn): void | type BlockFn = Global.BlockFn; |
1,786 | (event: AsyncEvent, state: State): void | Promise<void> | type AsyncEvent =
| {
// first action to dispatch. Good time to initialize all settings
name: 'setup';
testNamePattern?: string;
runtimeGlobals: JestGlobals;
parentProcess: Process;
}
| {
name: 'include_test_location_in_result';
}
| {
name: 'hook_start';
hoo... |
1,787 | (event: AsyncEvent, state: State): void | Promise<void> | type State = Circus.State; |
1,788 | (event: AsyncEvent, state: State): void | Promise<void> | type State = {
interrupted: boolean;
}; |
1,789 | (event: AsyncEvent, state: State): void | Promise<void> | type State = {
currentDescribeBlock: DescribeBlock;
currentlyRunningTest?: TestEntry | null; // including when hooks are being executed
expand?: boolean; // expand error messages
hasFocusedTests: boolean; // that are defined using test.only
hasStarted: boolean; // whether the rootDescribeBlock has started run... |
1,790 | (event: SyncEvent, state: State): void | type SyncEvent =
| {
asyncError: Error;
mode: BlockMode;
name: 'start_describe_definition';
blockName: BlockName;
}
| {
mode: BlockMode;
name: 'finish_describe_definition';
blockName: BlockName;
}
| {
asyncError: Error;
name: 'add_hook';
hookType... |
1,791 | (event: SyncEvent, state: State): void | type State = Circus.State; |
1,792 | (event: SyncEvent, state: State): void | type State = {
interrupted: boolean;
}; |
1,793 | (event: SyncEvent, state: State): void | type State = {
currentDescribeBlock: DescribeBlock;
currentlyRunningTest?: TestEntry | null; // including when hooks are being executed
expand?: boolean; // expand error messages
hasFocusedTests: boolean; // that are defined using test.only
hasStarted: boolean; // whether the rootDescribeBlock has started run... |
1,794 | (exception: Exception) => void | type Exception = any; |
1,795 | (exception: Exception, promise: Promise<unknown>) => void | type Exception = any; |
1,796 | createWorker(options: WorkerOptions): WorkerInterface | type WorkerOptions = {
forkOptions: ForkOptions;
resourceLimits: ResourceLimits;
setupArgs: Array<unknown>;
maxRetries: number;
workerId: number;
workerData?: unknown;
workerPath: string;
/**
* After a job has executed the memory usage it should return to.
*
* @remarks
* Note this is differe... |
1,797 | send(
request: ChildMessage,
onProcessStart: OnStart,
onProcessEnd: OnEnd,
onCustomMessage: OnCustomMessage,
): void | type OnStart = (worker: WorkerInterface) => void; |
1,798 | send(
request: ChildMessage,
onProcessStart: OnStart,
onProcessEnd: OnEnd,
onCustomMessage: OnCustomMessage,
): void | type OnCustomMessage = (message: Array<unknown> | unknown) => void; |
1,799 | send(
request: ChildMessage,
onProcessStart: OnStart,
onProcessEnd: OnEnd,
onCustomMessage: OnCustomMessage,
): void | type OnEnd = (err: Error | null, result: unknown) => void; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.