0.3.0 • Published 9 years ago

plum-test v0.3.0

Weekly downloads
3
License
MIT
Repository
github
Last release
9 years ago

plum-test Build Status

Build and run visual regression tests against plum stylesheets.

Getting Started

  • Install with NPM - npm install --save plum-test

Usage

Node

var plumTest = require('plum-test');

var options = {
  src: 'path/to/plum/directory',
  dest: 'path/to/save/results/to',
  stylesheets: ['path/to/compiled/stylesheets'],
};

plumTest(options, function(err, res) {
  if (err) {
    return err;
  }
  return res;
});

CLI

plum-test
  --src='path/to/plum/directory'
  --dest='path/to/save/results/to'
  --stylesheets='path/to/compiled/stylesheet, path/to/another/compiled/stylesheet'

To run only a specific test(s) you can pass a comma , seperated list of paths to the the --tests.

plum-test
  --src='path/to/plum/directory'
  --dest='path/to/save/results/to'
  --stylesheets='path/to/compiled/stylesheet, path/to/another/compiled/stylesheet'
  --tests='path/to/plum/directory/modules/module-one' # only test the module-one module.

API

test( options )

NameTypeArgumentDescription
options.srcstring<required>the src path to your plum stylesheets.
options.deststring<required>the path to save the test results to.
options.stylesheetsarray|string<required>the paths to your compiled css stylesheets.
options.testsarray|string<optional>the paths to the tests to be run.

callback( error, response )

NameTypeArgumentDescription
errorerror<required>any errors that may have occured.
responsestring<required>success message.

Developing

plum-test is built using ES6. Run the following task to compile the src/ into dist/.

npm run build

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality.

License

Copyright (c) 2015 Jason Bellamy
Licensed under the MIT license.