@babel/helper-transform-fixture-test-runner

  • Version 8.0.0
  • Published
  • 91.4 kB
  • 8 dependencies
  • MIT license

Install

npm i @babel/helper-transform-fixture-test-runner
yarn add @babel/helper-transform-fixture-test-runner
pnpm add @babel/helper-transform-fixture-test-runner

Overview

Transform test runner for @babel/helper-fixtures module

Index

Functions

function buildParallelProcessTests

buildParallelProcessTests: (
name: string,
tests: ProcessTest[]
) => (curr: number, total: number) => void;

    function buildProcessTests

    buildProcessTests: (
    dir: string | URL,
    beforeHook: ProcessTestBeforeHook,
    afterHook?: ProcessTestAfterHook
    ) => ProcessTest[];

      function createTestContext

      createTestContext: () => vm.Context;

        function export_default

        export_default: (
        fixturesLoc: string | URL,
        name: string,
        suiteOpts?: SuiteOptions,
        taskOpts?: TaskOptions,
        dynamicOpts?: (options: TaskOptions, task: Test) => void
        ) => void;

          function runCodeInTestContext

          runCodeInTestContext: (
          code: string,
          opts: { filename: string | URL; timeout?: number },
          context?: vm.Context
          ) => any;
          • Run the given snippet of code inside a CommonJS module.

            Exposed for unit tests, not for use as an API.

          Type Aliases

          type ProcessTest

          type ProcessTest = {
          suiteName: string;
          testName: string;
          skip: boolean;
          fn: Function;
          opts: ProcessTestOpts;
          binLoc?: string;
          };

            type ProcessTestAfterHook

            type ProcessTestAfterHook = (
            test: ProcessTest,
            tmpDir: string,
            stdout: string,
            stderr: string
            ) => {
            stdout: string;
            stderr: string;
            };

              type ProcessTestBeforeHook

              type ProcessTestBeforeHook = (test: ProcessTest, tmpDir: string) => void;

                type ProcessTestOpts

                type ProcessTestOpts = {
                args: string[];
                executor?: string;
                ipc?: boolean;
                ipcMessage?: string;
                stdout: string;
                stderr: string;
                stdin: string;
                stdoutPath: string;
                stderrPath: string;
                stdoutContains?: boolean;
                stderrContains?: boolean;
                testLoc: string;
                outFiles: Record<string, string>;
                inFiles: Record<string, string>;
                noBabelrc?: boolean;
                minNodeVersion?: number;
                env?: Record<string, string>;
                BABEL_8_BREAKING?: boolean;
                };

                  type SuiteOptions

                  type SuiteOptions = {
                  ignoreSuites?: string[];
                  ignoreTasks?: string[];
                  };

                    Package Files (1)

                    Dependencies (8)

                    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/@babel/helper-transform-fixture-test-runner.

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