blue-tape-fixture
TypeScript icon, indicating that this package has built-in type declarations

0.3.0 • Public • Published

blue tape fixture

npm version Build Status

Helps you to easily write fixture tests.

What is Fixture Test

Fixture tests are tests that require access to some files. The tests may write files and in that case the files can be compared with a baseline (i.e. Baseline Tests)

Usage

import tape = require('blue-tape');
import fixture from 'blue-tape-fixture';
 
// Point to the base folder which contain the fixtures.
const ftest = fixture(tape, './src/_fixture_/cases');
 
// You can also use absolute path.
// const ftest = fixture(process.env.PWD, 'fixture/cases');
 
ftest('test name', 'fixture-name', (t, path) => {
  // t is blue-tape test.
  // path is the path to the fixture-name folder.
  // ...test away
});

Contribute

# right after fork 
npm install
 
# begin making changes 
npm run watch
 

Readme

Keywords

Package Sidebar

Install

npm i blue-tape-fixture

Weekly Downloads

10

Version

0.3.0

License

MIT

Last publish

Collaborators

  • unional