Run visual regression test suites against plum stylesheets using CasperJS & PhantomCSS.
- Install with NPM -
npm install --save plum-regression
var regression = require('plum-regression');
var options = {
stylesheets: 'path/to/stylesheets',
tests: [ 'modules/', 'units/', 'pages/' ],
fixtures: 'path/to/fixtures',
results: 'path/to/save/results/to',
failures: 'path/to/save/failures/to'
};
regression(options, function(err, response) {
if (err) {
return err;
}
return response;
});
Name | Type | Argument | Description |
---|---|---|---|
options.stylesheets | string |
<required> |
the path to your plum stylesheets. |
options.tests | array |
<required> |
files and/or directories containing the tests to run. |
options.fixtures | string |
<required> |
the path containing the test fixtures to use. |
options.results | string |
<required> |
the path to save the test results to. |
options.failures | string |
<required> |
the path to save the test failures to. |
Name | Type | Argument | Description |
---|---|---|---|
error | error |
<required> |
any errors that may have occured. |
response | string |
<required> |
success message. |
plum-regression is built using ES6. Run the following task to compile the src/
into dist/
.
npm run build
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality.
Copyright (c) 2015 Jason Bellamy
Licensed under the MIT license.