index.d.ts 1.5 KB

123456789101112131415161718192021222324
  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. */
  7. import { Config } from '@jest/types';
  8. import { AssertionResult, SerializableError } from '@jest/test-result';
  9. import { Frame } from './types';
  10. export { Frame } from './types';
  11. export declare type StackTraceConfig = Pick<Config.ProjectConfig, 'rootDir' | 'testMatch'>;
  12. export declare type StackTraceOptions = {
  13. noStackTrace: boolean;
  14. };
  15. export declare const formatExecError: (error: string | Error | SerializableError | undefined, config: Pick<Config.ProjectConfig, "rootDir" | "testMatch">, options: StackTraceOptions, testPath?: string | undefined, reuseMessage?: boolean | undefined) => string;
  16. export declare const getStackTraceLines: (stack: string, options?: StackTraceOptions) => string[];
  17. export declare const getTopFrame: (lines: string[]) => Frame | null;
  18. export declare const formatStackTrace: (stack: string, config: Pick<Config.ProjectConfig, "rootDir" | "testMatch">, options: StackTraceOptions, testPath?: string | undefined) => string;
  19. export declare const formatResultsErrors: (testResults: AssertionResult[], config: Pick<Config.ProjectConfig, "rootDir" | "testMatch">, options: StackTraceOptions, testPath?: string | undefined) => string | null;
  20. export declare const separateMessageFromStack: (content: string) => {
  21. message: string;
  22. stack: string;
  23. };
  24. //# sourceMappingURL=index.d.ts.map