tape-rollup

raw JSON →
4.6.4 verified Mon Apr 27 auth: no javascript maintenance

A standalone version of the Tape test runner bundled specifically for use with Rollup. Version 4.6.4 is the current stable release. The package is a thin wrapper that re-exports Tape's core functionality (test, skip, only, etc.) in a way that is compatible with Rollup's ES module resolution. Key differentiator: eliminates the need for Node.js built-in module polyfills when using Tape with Rollup. Release cadence is sporadic, with the last update in 2018. Only suitable for projects using Rollup as their build system.

error Error: Cannot find module 'tape-rollup'
cause Package not installed or incorrect import path.
fix
Run 'npm install tape-rollup' and ensure the import matches the package name.
error SyntaxError: The requested module 'tape-rollup' does not provide an export named 'test'
cause Using named import { test } instead of default import.
fix
Change to 'import test from "tape-rollup"' (default import).
error TypeError: test is not a function
cause Using require('tape-rollup') which returns an object with a default property.
fix
Use ES module import syntax: 'import test from "tape-rollup"'
breaking The package is ESM-only; does not export a CommonJS module. Using require() will fail.
fix Use 'import test from "tape-rollup"' with an ESM-compatible environment or bundler.
deprecated The library has not been updated since 2018. It may not work with newer versions of Rollup (>=2.0) or Tape (>5).
fix Consider using the 'tape' package directly with proper Rollup configuration for Node built-in modules.
gotcha Do not import named exports like 'skip' or 'only' with a default import pattern.
fix Use named import syntax: import { skip } from 'tape-rollup'
npm install tape-rollup
yarn add tape-rollup
pnpm add tape-rollup

Basic usage: import default function 'test' and write a simple test assertion.

import test from 'tape-rollup';

test('addition', (t) => {
  t.plan(1);
  t.equal(1 + 1, 2);
});