jest-message-util

  • Version 27.3.1
  • Published
  • 17.8 kB
  • 9 dependencies
  • MIT license

Install

npm i jest-message-util
yarn add jest-message-util
pnpm add jest-message-util

Overview

Overview not available.

Index

Functions

function formatExecError

formatExecError: (
error: Error | TestResult.SerializableError | string | undefined,
config: StackTraceConfig,
options: StackTraceOptions,
testPath?: string | undefined,
reuseMessage?: boolean | undefined
) => string;

    function formatResultsErrors

    formatResultsErrors: (
    testResults: Array<TestResult.AssertionResult>,
    config: StackTraceConfig,
    options: StackTraceOptions,
    testPath?: string | undefined
    ) => string | null;

      function formatStackTrace

      formatStackTrace: (
      stack: string,
      config: StackTraceConfig,
      options: StackTraceOptions,
      testPath?: string | undefined
      ) => string;

        function getStackTraceLines

        getStackTraceLines: (
        stack: string,
        options?: StackTraceOptions
        ) => Array<string>;

          function getTopFrame

          getTopFrame: (lines: Array<string>) => Frame | null;

            function separateMessageFromStack

            separateMessageFromStack: (
            content: string
            ) => { message: string; stack: string };

              Interfaces

              interface Frame

              interface Frame extends StackData {}

                property file

                file: string;

                  Type Aliases

                  type StackTraceConfig

                  type StackTraceConfig = Pick<Config.ProjectConfig, 'rootDir' | 'testMatch'>;

                    type StackTraceOptions

                    type StackTraceOptions = {
                    noStackTrace: boolean;
                    noCodeFrame?: boolean;
                    };

                      Package Files (2)

                      Dependencies (9)

                      Dev Dependencies (3)

                      Peer Dependencies (0)

                      No peer dependencies.

                      Badge

                      To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                      You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/jest-message-util.

                      • Markdown
                        [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/jest-message-util)
                      • HTML
                        <a href="https://www.jsdocs.io/package/jest-message-util"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>