tape

  • Version 5.10.2
  • Published
  • 477 kB
  • 25 dependencies
  • MIT license

Install

npm i tape
yarn add tape
pnpm add tape

Overview

tap-producing test harness for node and browsers

Index

Variables

variable skip

const skip: any;

    variable test

    const test: Harness;

      Functions

      function createHarness

      createHarness: (conf_?: HarnessConfig) => Harness;

        function createStream

        createStream: (opts?: StreamOptions) => ThroughStream;

          function getHarness

          getHarness: (opts?: HarnessConfig) => Harness;

            function harnessFunction

            harnessFunction: {
            (this: Test, name: string, opts: tape.TestOptions, cb: Test.TestCase): Test;
            (this: Test, name: string, opts: tape.TestOptions): Test;
            (this: Test, name: string, cb: Test.TestCase): Test;
            (this: Test, name: string): Test;
            (this: Test, opts: tape.TestOptions, cb: Test.TestCase): Test;
            (this: Test, opts: tape.TestOptions): Test;
            (this: Test, cb: Test.TestCase): Test;
            (this: void, name: string, opts: tape.TestOptions, cb: Test.TestCase): Test;
            (this: void, name: string, opts: tape.TestOptions): Test;
            (this: void, name: string, cb: Test.TestCase): Test;
            (this: void, name: string): Test;
            (this: void, opts: tape.TestOptions, cb: Test.TestCase): Test;
            (this: void, opts: tape.TestOptions): Test;
            (this: void, cb: Test.TestCase): Test;
            };

              function onFailure

              onFailure: (cb: Test.SyncCallback, ...rest: unknown[]) => void;

                function onFinish

                onFinish: (cb: Test.SyncCallback, ...rest: unknown[]) => void;

                  function only

                  only: {
                  (name: string, cb: Test.TestCase): void;
                  (name: string, opts: TestOptions, cb: Test.TestCase): void;
                  (cb: Test.TestCase): void;
                  (opts: TestOptions, cb?: Test.TestCase): void;
                  };

                    function run

                    run: () => void;

                      function tape

                      tape: typeof tape;

                        function wait

                        wait: () => void;

                          Interfaces

                          interface AssertOptions

                          interface AssertOptions {}

                            property actual

                            actual?: unknown;

                              property exiting

                              exiting?: boolean;

                                property expected

                                expected?: unknown;

                                  property message

                                  message?: string | undefined;

                                    property skip

                                    skip?: boolean | string | undefined;

                                      property todo

                                      todo?: boolean | string | undefined;

                                        interface StreamOptions

                                        interface StreamOptions {}

                                          property objectMode

                                          objectMode?: boolean | undefined;

                                            Type Aliases

                                            type Callback

                                            type Callback = Test.Callback;

                                              type CreateStream

                                              type CreateStream = typeof createStream;

                                                type Harness

                                                type Harness = typeof harnessFunction & {
                                                run?: () => void;
                                                only: typeof only;
                                                _exitCode: number;
                                                _results: Results;
                                                _tests: Test[];
                                                close: () => void;
                                                createStream: CreateStream;
                                                onFailure: HarnessEventHandler;
                                                onFinish: HarnessEventHandler;
                                                };

                                                  type HarnessConfig

                                                  type HarnessConfig = {
                                                  autoclose?: boolean;
                                                  noOnly?: boolean;
                                                  stream?: NodeJS.WritableStream | ThroughStream;
                                                  exit?: boolean;
                                                  } & StreamOptions;

                                                    type HarnessEventHandler

                                                    type HarnessEventHandler = (cb: Test.SyncCallback, ...rest: unknown[]) => void;

                                                      type InterceptResults

                                                      type InterceptResults = Test.InterceptResults;

                                                        type RestoreFunction

                                                        type RestoreFunction = Test.RestoreFunction;

                                                          type SyncCallback

                                                          type SyncCallback = Test.SyncCallback;

                                                            type SyncOrAsyncCallback

                                                            type SyncOrAsyncCallback = Test.Callback;

                                                              type TestCase

                                                              type TestCase = Test.TestCase;

                                                                type TestOptions

                                                                type TestOptions = {
                                                                objectPrintDepth?: number | undefined;
                                                                skip?: boolean | string | undefined;
                                                                timeout?: number | undefined;
                                                                ignoreSyncTimeout?: boolean;
                                                                todo?: boolean | string | undefined;
                                                                };

                                                                  type WrapObject

                                                                  type WrapObject<T extends Test.Callback> = Test.WrapObject<T>;

                                                                    type WrappedCall

                                                                    type WrappedCall = Test.WrappedCall;

                                                                      type WrappedFn

                                                                      type WrappedFn<T extends Test.Callback> = Test.WrappedFn<T>;

                                                                        type WrapResults

                                                                        type WrapResults = Test.WrapResults;

                                                                          Package Files (1)

                                                                          Dependencies (25)

                                                                          Dev Dependencies (44)

                                                                          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/tape.

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