Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

tape-index

medikoo64ISC3.2.0

Automatically index and test all modules

id, key

readme

*nix build status Windows build status Tests coverage Transpilation status npm version

tape-index

Ensure all package modules are covered by tests

Creates tests index (test run entry point) which loads all tests files and ensures failures to be exposed for modules which do not seem to have corresponding test files

For example, for foo.js module, utility will expect either test/foo.js test file or test/foo folder with multiple test files.

Installation

$ npm install tape-index

Usage

In project path:

$ npx tape-index

Will create a test.index.js file, that when run will indicate with fail missing test files and will invoke all existing modules tests.

Following npm scripts setup is recommended

{
    "test-prepare": "tape-index",
    "test-run": "node test.index.js",
    "test": "npm run test-prepare && npm run test-run"
}

Tests

$ npm test

changelog

Changelog

All notable changes to this project will be documented in this file. See standard-version for commit guidelines.

3.2.0 (2021-10-06)

Features

  • Ignore any *.config.js files (32e6055)
  • Ignore root test.js file (8d1e75d)

3.1.0 (2019-03-19)

Features

  • ignore '_' prefixed files in tests (ae5c6c5)

3.0.1 (2019-02-04)

Bug Fixes

3.0.0 (2019-02-04)

Chores

Features

  • ensure .js extension on binary (372cf31)
  • exclude js files starting with "." (09557a8)
  • imply "essentials" require (25c1478)
  • refactor into async/await (a1b1c21)
  • rely on essentials (ce5a830)
  • support multiple test files for single module (c2b24a6)
  • upgrade to ES2015 (d24b8e4)
  • upgrade to ES2015 (80e68e9)

BREAKING CHANGES

  • Direct name of binary file was renamed to have .js extension
  • Drop support for non ES2016+ enviroments

2.0.0 (2018-03-30)

Features

  • add 'lib' to ignored folders (208b200)

BREAKING CHANGES

  • Modules in 'lib' folder are no longer picked (as treated "private" which should be tested only through public ends)

1.1.1 (2017-09-05)

1.1.0 (2017-05-09)

Features

  • ensure long error stack traces (58ab8e8)

1.0.0 (2017-04-13)