# plum-test

> Build and run visual regression tests against plum stylesheets.

Latest version **0.3.0** (published 2015-08-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install plum-test
pnpm add plum-test
yarn add plum-test
bun add plum-test
```

Provides the command `plum-test`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.0 |
| Published | 2015-08-28 |
| First published | 2015-08-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 0.10.0 |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Jason Bellamy |
| Maintainers | jasonbellamy |
| Keywords | plum, regression, test, casperjs, phantomcss |

## Links

- npm: https://www.npmjs.com/package/plum-test
- Repository: https://github.com/plum-css/plum-test
- Issues: https://github.com/plum-css/plum-test/issues
- npm.io page: https://npm.io/package/plum-test

## Dependencies (3)

- [minimist](https://npm.io/package/minimist.md) ^1.1.3
- [plum-fixture](https://npm.io/package/plum-fixture.md) ^1.1.1
- [plum-regression](https://npm.io/package/plum-regression.md) ^1.3.1

## Alternatives

- [duck](https://npm.io/package/duck.md) — 4.2M weekly downloads
- [ava](https://npm.io/package/ava.md) — 560.2K weekly downloads
- [storybook-addon-module-mock](https://npm.io/package/storybook-addon-module-mock.md) — 71.7K weekly downloads
- [@ethereum-waffle/mock-contract](https://npm.io/package/@ethereum-waffle/mock-contract.md) — 40.0K weekly downloads
- [aws-elasticsearch-connector](https://npm.io/package/aws-elasticsearch-connector.md) — 37.4K weekly downloads

## Recent versions

- 0.3.0 (latest) — 2015-08-28
- 0.2.0 — 2015-08-19
- 0.1.1 — 2015-08-17
- 0.1.0 — 2015-08-17
- 0.0.1 — 2015-08-12

## README

# plum-test [![Build Status](https://travis-ci.org/plum-css/plum-test.png?branch=master)](https://travis-ci.org/plum-css/plum-test)

> Build and run visual regression tests against plum stylesheets.

## Getting Started

- Install with [NPM](https://www.npmjs.org/) - `npm install --save plum-test`


## Usage

### Node

```javascript
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

```bash
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`.

```bash
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 )

Name                | Type            | Argument     | Description
--------------------|-----------------|--------------|------------
options.src         | `string`        | `<required>` | the src path to your plum stylesheets.
options.dest        | `string`        | `<required>` | the path to save the test results to.
options.stylesheets | `array|string`  | `<required>` | the paths to your compiled css stylesheets.
options.tests       | `array|string`  | `<optional>` | the paths to the tests to be run.

#### callback( error, response )

Name     | Type       | Argument     | Description
---------|------------|--------------|------------
error    | `error`    | `<required>` | any errors that may have occured.
response | `string`   | `<required>` | success message.


## Developing

[plum-test](https://github.com/plum-css/plum-test) is built using **ES6**. Run the following task to compile the `src/` into `dist/`.

```bash
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 ](http://jasonbellamy.com)  
Licensed under the MIT license.

---
_Source: https://npm.io/package/plum-test · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
