@jest/console

  • Version 27.1.0
  • Published
  • 21.6 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: any,
globalConfig: any
) => string;

    Classes

    class BufferedConsole

    class BufferedConsole extends Console {}

      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?: any) => 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: (
                                            buffer: ConsoleBuffer,
                                            type: LogType,
                                            message: LogMessage,
                                            level?: number | null
                                            ) => ConsoleBuffer;

                                              class CustomConsole

                                              class CustomConsole extends Console {}

                                                constructor

                                                constructor(stdout: any, stderr: any, 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?: any) => 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;
                                                                                                                        • Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.

                                                                                                                          This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree.

                                                                                                                        type LogType

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

                                                                                                                          Package Files (6)

                                                                                                                          Dependencies (6)

                                                                                                                          Dev Dependencies (2)

                                                                                                                          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>