jest-util

  • Version 27.3.1
  • Published
  • 41.8 kB
  • 6 dependencies
  • MIT license

Install

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

Overview

Overview not available.

Index

Variables

variable isInteractive

const isInteractive: boolean;
  • 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.

Functions

function clearLine

clearLine: (stream: any) => void;
  • 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.

function convertDescriptorToString

convertDescriptorToString: <T extends string | number | Function>(
descriptor: T
) => T | 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.

function createDirectory

createDirectory: (path: any) => void;

    function deepCyclicCopy

    deepCyclicCopy: <T>(
    value: T,
    options?: DeepCyclicCopyOptions,
    cycles?: WeakMap<any, any>
    ) => T;

      function formatTime

      formatTime: (
      time: number,
      prefixPower?: number,
      padLeftLength?: number
      ) => 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.

      function globsToMatcher

      globsToMatcher: (globs: Array<Config.Glob>) => Matcher;
      • Converts a list of globs into a function that matches a path against the globs.

        Every time picomatch is called, it will parse the glob strings and turn them into regexp instances. Instead of calling picomatch repeatedly with the same globs, we can use this function which will build the picomatch matchers ahead of time and then have an optimized path for determining whether an individual path matches.

        This function is intended to match the behavior of micromatch().

        Example 1

        const isMatch = globsToMatcher(['*.js', '!*.test.js']); isMatch('pizza.js'); // true isMatch('pizza.test.js'); // false

      function installCommonGlobals

      installCommonGlobals: (
      globalObject: typeof globalThis,
      globals: any
      ) => typeof globalThis & Config.ConfigGlobals;

        function interopRequireDefault

        interopRequireDefault: (obj: any) => any;
        • 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.

        function isPromise

        isPromise: (candidate: unknown) => candidate is Promise<unknown>;
        • 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.

        function pluralize

        pluralize: (word: string, count: number) => 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.

        function replacePathSepForGlob

        replacePathSepForGlob: (path: any) => any;

          function requireOrImportModule

          requireOrImportModule: <T>(
          filePath: any,
          applyInteropRequireDefault?: boolean
          ) => Promise<T>;

            function setGlobal

            setGlobal: (
            globalToMutate: typeof globalThis,
            key: string,
            value: unknown
            ) => void;
            • 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.

            function testPathPatternToRegExp

            testPathPatternToRegExp: (testPathPattern: any) => RegExp;

              function tryRealpath

              tryRealpath: (path: any) => any;

                Classes

                class ErrorWithStack

                class ErrorWithStack extends Error {}
                • 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.

                constructor

                constructor(
                message: string,
                callsite: (...args: Array<any>) => unknown,
                stackLimit?: number
                );

                  Namespaces

                  namespace preRunMessage

                  module 'build/preRunMessage.d.ts' {}
                  • 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.

                  function print

                  print: (stream: any) => void;
                  • 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.

                  function remove

                  remove: (stream: any) => void;

                    namespace specialChars

                    module 'build/specialChars.d.ts' {}
                    • 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.

                    variable ARROW

                    const ARROW: 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.

                    variable CLEAR

                    const CLEAR: string;

                      variable ICONS

                      const ICONS: { failed: string; pending: string; success: string; todo: string };

                        Package Files (20)

                        Dependencies (6)

                        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-util.

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