jest-message-util

  • Version 30.5.1
  • Published
  • 26.3 kB
  • 10 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 flattenErrorStack

flattenErrorStack: (error: Error) => string;

    function formatErrorStack

    formatErrorStack: (
    errorOrStack: Error | string,
    config: StackTraceConfig,
    options: StackTraceOptions,
    testPath?: string
    ) => string;

      function formatExecError

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

        function formatPath

        formatPath: (
        line: string,
        config: StackTraceConfig,
        relativeTestPath?: string | null
        ) => string;

          function formatResultsErrors

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

            function formatStackTrace

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

              function getStackTraceLines

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

                function getTopFrame

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

                  function hasNestedErrors

                  hasNestedErrors: (value: unknown) => value is Error;

                    function indentAllLines

                    indentAllLines: (lines: string) => string;

                      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 (1)

                                Dependencies (10)

                                Dev Dependencies (4)

                                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>