jest-each

  • Version 27.4.6
  • Published
  • 40 kB
  • 5 dependencies
  • MIT license

Install

npm i jest-each
yarn add jest-each
pnpm add jest-each

Overview

Parameterised tests for Jest

Index

Variables

Functions

Variables

variable each

const each: {
(table: Global.EachTable, ...data: Global.TemplateData): ReturnType<
typeof install
>;
withGlobal(
g: Global.Global
): (
table: Global.EachTable,
...data: Global.TemplateData
) => {
describe: {
(
title: string,
suite: Global.EachTestFn<Global.BlockFn>,
timeout?: number | undefined
): void;
skip: (
title: string,
test: Global.EachTestFn<Global.TestCallback>,
timeout?: number | undefined
) => void;
only: (
title: string,
test: Global.EachTestFn<Global.TestCallback>,
timeout?: number | undefined
) => void;
};
fdescribe: (
title: string,
test: Global.EachTestFn<Global.TestCallback>,
timeout?: number | undefined
) => void;
fit: (
title: string,
test: Global.EachTestFn<Global.TestCallback>,
timeout?: number | undefined
) => void;
it: {
(
title: string,
test: Global.EachTestFn<Global.TestFn>,
timeout?: number | undefined
): void;
skip: (
title: string,
test: Global.EachTestFn<Global.TestCallback>,
timeout?: number | undefined
) => void;
only: (
title: string,
test: Global.EachTestFn<Global.TestCallback>,
timeout?: number | undefined
) => void;
concurrent: {
(
title: string,
test: Global.EachTestFn<Global.TestFn>,
timeout?: number | undefined
): void;
only: (
title: string,
test: Global.EachTestFn<Global.TestCallback>,
timeout?: number | undefined
) => void;
skip: (
title: string,
test: Global.EachTestFn<Global.TestCallback>,
timeout?: number | undefined
) => void;
};
};
test: {
(
title: string,
test: Global.EachTestFn<Global.TestFn>,
timeout?: number | undefined
): void;
skip: (
title: string,
test: Global.EachTestFn<Global.TestCallback>,
timeout?: number | undefined
) => void;
only: (
title: string,
test: Global.EachTestFn<Global.TestCallback>,
timeout?: number | undefined
) => void;
concurrent: {
(
title: string,
test: Global.EachTestFn<Global.TestFn>,
timeout?: number | undefined
): void;
only: (
title: string,
test: Global.EachTestFn<Global.TestCallback>,
timeout?: number | undefined
) => void;
skip: (
title: string,
test: Global.EachTestFn<Global.TestCallback>,
timeout?: number | undefined
) => void;
};
};
xdescribe: (
title: string,
test: Global.EachTestFn<Global.TestCallback>,
timeout?: number | undefined
) => void;
xit: (
title: string,
test: Global.EachTestFn<Global.TestCallback>,
timeout?: number | undefined
) => void;
xtest: (
title: string,
test: Global.EachTestFn<Global.TestCallback>,
timeout?: number | undefined
) => void;
};
};

    Functions

    function bind

    bind: <EachCallback extends Global.TestCallback>(
    cb: GlobalCallback,
    supportsDone?: boolean
    ) => (
    table: Global.EachTable,
    ...taggedTemplateData: Global.TemplateData
    ) => (
    title: string,
    test: Global.EachTestFn<EachCallback>,
    timeout?: number | undefined
    ) => void;

      function install

      install: (
      g: Global.Global,
      table: Global.EachTable,
      ...data: Global.TemplateData
      ) => {
      describe: {
      (
      title: string,
      suite: Global.EachTestFn<Global.BlockFn>,
      timeout?: number | undefined
      ): void;
      skip: (
      title: string,
      test: Global.EachTestFn<Global.TestCallback>,
      timeout?: number | undefined
      ) => void;
      only: (
      title: string,
      test: Global.EachTestFn<Global.TestCallback>,
      timeout?: number | undefined
      ) => void;
      };
      fdescribe: (
      title: string,
      test: Global.EachTestFn<Global.TestCallback>,
      timeout?: number | undefined
      ) => void;
      fit: (
      title: string,
      test: Global.EachTestFn<Global.TestCallback>,
      timeout?: number | undefined
      ) => void;
      it: {
      (
      title: string,
      test: Global.EachTestFn<Global.TestFn>,
      timeout?: number | undefined
      ): void;
      skip: (
      title: string,
      test: Global.EachTestFn<Global.TestCallback>,
      timeout?: number | undefined
      ) => void;
      only: (
      title: string,
      test: Global.EachTestFn<Global.TestCallback>,
      timeout?: number | undefined
      ) => void;
      concurrent: {
      (
      title: string,
      test: Global.EachTestFn<Global.TestFn>,
      timeout?: number | undefined
      ): void;
      only: (
      title: string,
      test: Global.EachTestFn<Global.TestCallback>,
      timeout?: number | undefined
      ) => void;
      skip: (
      title: string,
      test: Global.EachTestFn<Global.TestCallback>,
      timeout?: number | undefined
      ) => void;
      };
      };
      test: {
      (
      title: string,
      test: Global.EachTestFn<Global.TestFn>,
      timeout?: number | undefined
      ): void;
      skip: (
      title: string,
      test: Global.EachTestFn<Global.TestCallback>,
      timeout?: number | undefined
      ) => void;
      only: (
      title: string,
      test: Global.EachTestFn<Global.TestCallback>,
      timeout?: number | undefined
      ) => void;
      concurrent: {
      (
      title: string,
      test: Global.EachTestFn<Global.TestFn>,
      timeout?: number | undefined
      ): void;
      only: (
      title: string,
      test: Global.EachTestFn<Global.TestCallback>,
      timeout?: number | undefined
      ) => void;
      skip: (
      title: string,
      test: Global.EachTestFn<Global.TestCallback>,
      timeout?: number | undefined
      ) => void;
      };
      };
      xdescribe: (
      title: string,
      test: Global.EachTestFn<Global.TestCallback>,
      timeout?: number | undefined
      ) => void;
      xit: (
      title: string,
      test: Global.EachTestFn<Global.TestCallback>,
      timeout?: number | undefined
      ) => void;
      xtest: (
      title: string,
      test: Global.EachTestFn<Global.TestCallback>,
      timeout?: number | undefined
      ) => void;
      };

        Package Files (2)

        Dependencies (5)

        Dev Dependencies (0)

        No dev dependencies.

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

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