2.0.1 • Published 5 years ago

fixture-skipper v2.0.1

Weekly downloads
2
License
Apache-2.0
Repository
github
Last release
5 years ago

fixture-skipper

Greenkeeper badge npm version Build Status

skip fixture tests with "_" prefix

If you are dynamically running tests based on folders of fixture files, there is no easy way to it.only or run only one test while debugging. Now you can prefix one of your fixture folders with "_", and it will be the only test that runs.

const path = require('path');
const fixtureSkipper = require('fixture-skipper');

const fixturesPath = 'test/fixtures';

// with folders "1", "2", "3", all tests run
// with folders "1", "2", "_3", only "_3" runs

const forEachDir = fixtureSkipper(fixturesPath);

describe('my tests', function() {
  forEachDir((it, fixturesDir) => {
    it(`testing fixtures: ${fixturesDir}`, function() {
      let fixtures = fixturify.readSync(path.join(fixturesPath, fixturesDir));

      // test using your fixtures
    });
  });
});
2.0.1

5 years ago

2.0.0

6 years ago

1.2.0

7 years ago

1.1.0

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago

0.0.0

7 years ago