2.0.1 • Published 7 years ago

mocha-metatitles v2.0.1

Weekly downloads
-
License
WTFPL
Repository
-
Last release
7 years ago

mocha-metatitles

Travis Build NPM Version NPM Downloads

Add metadata to mocha test titles.

Sample usage

Build some test types and make them globally available

const mochaTestType = require('mocha-metatitles');

global.slowTest = mochaTestType('slow');
global.fastTest = mochaTestType('fast');

Use test types like the describe function from mocha:

fastTest('Fast test title:', () => {
  it('should work correctly and be fast', () => {
    // empty
  });
}

Features

  • Test titles with test type and file path

test-screenshot

  • Easy grep through test types

grep-screenshot

  • Setup conditional test execution using options.argv parameter. See more options
const mochaTestType = require('mocha-metatitles');
const slowTest = mochaTestType('slow', { argv: { slowTests: true} });

slowTest('Slow test:', () => {
  it('Runs only on command line parameter slowTests=true', () => {
    // empty
  });
}
2.0.1

7 years ago

2.0.0

7 years ago

1.1.0

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago