jest-mock-console

  • Version 2.0.0
  • Published
  • 15.5 kB
  • No dependencies
  • MIT license

Install

npm i jest-mock-console
yarn add jest-mock-console
pnpm add jest-mock-console

Overview

Jest utility to mock the console

Index

Namespaces

namespace jest-mock-console

module 'jest-mock-console' {}

    function MockConsole

    MockConsole: {
    (): RestoreConsole;
    (mockArg: keyof Console): RestoreConsole;
    (mockArg: (keyof Console)[]): RestoreConsole;
    (mockArg: MockObj): RestoreConsole;
    };

      type MockObj

      type MockObj = { [key in ConsoleProps]?: DefaultConsole[key] };

        type RestoreConsole

        type RestoreConsole = () => void;

          Package Files (1)

          Dependencies (0)

          No dependencies.

          Dev Dependencies (13)

          Peer Dependencies (1)

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

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