@jest/console

  • Version 29.3.1
  • Published
  • 19.2 kB
  • 6 dependencies
  • MIT license

Install

npm i @jest/console
yarn add @jest/console
pnpm add @jest/console

Overview

Overview not available.

Index

Functions

function getConsoleOutput

getConsoleOutput: (
buffer: ConsoleBuffer,
config: StackTraceConfig,
globalConfig: Config.GlobalConfig
) => string;

    Classes

    class BufferedConsole

    class BufferedConsole extends Console_2 {}

      constructor

      constructor();

        property Console

        Console: any;

          method assert

          assert: (value: unknown, message?: string | Error) => void;

            method count

            count: (label?: string) => void;

              method countReset

              countReset: (label?: string) => void;

                method debug

                debug: (firstArg: unknown, ...rest: Array<unknown>) => void;

                  method dir

                  dir: (firstArg: unknown, options?: InspectOptions) => void;

                    method dirxml

                    dirxml: (firstArg: unknown, ...rest: Array<unknown>) => void;

                      method error

                      error: (firstArg: unknown, ...rest: Array<unknown>) => void;

                        method getBuffer

                        getBuffer: () => ConsoleBuffer | undefined;

                          method group

                          group: (title?: string, ...rest: Array<unknown>) => void;

                            method groupCollapsed

                            groupCollapsed: (title?: string, ...rest: Array<unknown>) => void;

                              method groupEnd

                              groupEnd: () => void;

                                method info

                                info: (firstArg: unknown, ...rest: Array<unknown>) => void;

                                  method log

                                  log: (firstArg: unknown, ...rest: Array<unknown>) => void;

                                    method time

                                    time: (label?: string) => void;

                                      method timeEnd

                                      timeEnd: (label?: string) => void;

                                        method timeLog

                                        timeLog: (label?: string, ...data: Array<unknown>) => void;

                                          method warn

                                          warn: (firstArg: unknown, ...rest: Array<unknown>) => void;

                                            method write

                                            static write: (
                                            this: void,
                                            buffer: ConsoleBuffer,
                                            type: LogType,
                                            message: LogMessage,
                                            level?: number | null
                                            ) => ConsoleBuffer;

                                              class CustomConsole

                                              class CustomConsole extends Console_2 {}

                                                constructor

                                                constructor(
                                                stdout: NodeJS.WriteStream,
                                                stderr: NodeJS.WriteStream,
                                                formatBuffer?: Formatter
                                                );

                                                  property Console

                                                  Console: any;

                                                    method assert

                                                    assert: (value: unknown, message?: string | Error) => asserts value;

                                                      method count

                                                      count: (label?: string) => void;

                                                        method countReset

                                                        countReset: (label?: string) => void;

                                                          method debug

                                                          debug: (firstArg: unknown, ...args: Array<unknown>) => void;

                                                            method dir

                                                            dir: (firstArg: unknown, options?: InspectOptions) => void;

                                                              method dirxml

                                                              dirxml: (firstArg: unknown, ...args: Array<unknown>) => void;

                                                                method error

                                                                error: (firstArg: unknown, ...args: Array<unknown>) => void;

                                                                  method getBuffer

                                                                  getBuffer: () => undefined;

                                                                    method group

                                                                    group: (title?: string, ...args: Array<unknown>) => void;

                                                                      method groupCollapsed

                                                                      groupCollapsed: (title?: string, ...args: Array<unknown>) => void;

                                                                        method groupEnd

                                                                        groupEnd: () => void;

                                                                          method info

                                                                          info: (firstArg: unknown, ...args: Array<unknown>) => void;

                                                                            method log

                                                                            log: (firstArg: unknown, ...args: Array<unknown>) => void;

                                                                              method time

                                                                              time: (label?: string) => void;

                                                                                method timeEnd

                                                                                timeEnd: (label?: string) => void;

                                                                                  method timeLog

                                                                                  timeLog: (label?: string, ...data: Array<unknown>) => void;

                                                                                    method warn

                                                                                    warn: (firstArg: unknown, ...args: Array<unknown>) => void;

                                                                                      class NullConsole

                                                                                      class NullConsole extends CustomConsole {}

                                                                                        method assert

                                                                                        assert: () => void;

                                                                                          method debug

                                                                                          debug: () => void;

                                                                                            method dir

                                                                                            dir: () => void;

                                                                                              method error

                                                                                              error: () => void;

                                                                                                method group

                                                                                                group: () => void;

                                                                                                  method groupCollapsed

                                                                                                  groupCollapsed: () => void;

                                                                                                    method groupEnd

                                                                                                    groupEnd: () => void;

                                                                                                      method info

                                                                                                      info: () => void;

                                                                                                        method log

                                                                                                        log: () => void;

                                                                                                          method time

                                                                                                          time: () => void;

                                                                                                            method timeEnd

                                                                                                            timeEnd: () => void;

                                                                                                              method timeLog

                                                                                                              timeLog: () => void;

                                                                                                                method trace

                                                                                                                trace: () => void;

                                                                                                                  method warn

                                                                                                                  warn: () => void;

                                                                                                                    Type Aliases

                                                                                                                    type ConsoleBuffer

                                                                                                                    type ConsoleBuffer = Array<LogEntry>;

                                                                                                                      type LogEntry

                                                                                                                      type LogEntry = {
                                                                                                                      message: LogMessage;
                                                                                                                      origin: string;
                                                                                                                      type: LogType;
                                                                                                                      };

                                                                                                                        type LogMessage

                                                                                                                        type LogMessage = string;

                                                                                                                          type LogType

                                                                                                                          type LogType =
                                                                                                                          | 'assert'
                                                                                                                          | 'count'
                                                                                                                          | 'debug'
                                                                                                                          | 'dir'
                                                                                                                          | 'dirxml'
                                                                                                                          | 'error'
                                                                                                                          | 'group'
                                                                                                                          | 'groupCollapsed'
                                                                                                                          | 'info'
                                                                                                                          | 'log'
                                                                                                                          | 'time'
                                                                                                                          | 'warn';

                                                                                                                            Package Files (1)

                                                                                                                            Dependencies (6)

                                                                                                                            Dev Dependencies (1)

                                                                                                                            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/console.

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