0.1.3 • Published 8 years ago

cappu v0.1.3

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

cappu

Trigger desktop notifications from JS testing frameworks, based on growl.

Travis npm GitHub license

Specially useful when tests are ran inside a docker container.

Works with the following testing frameworks and reporters:

  • Mocha
    • spec
    • tap

Installation

Follow instructions on node-growl and install it, then install cappu:

$ npm install -g cappu

Example Use Case

Mocha tests are ran inside a docker container and you want to trigger notifications on the host OS.

test.js

const expect = require('chai').expect;
describe('demo only', () => {
  it('should pass', () => {
    expect(1).to.eql(1);
  });
});

package.json

...
  "scripts": {
    "test": "docker build -t test/cappu-test . && docker run -d test/cappu-test",
    "test:mocha": "mocha --reporter spec --colors ./test/demo/test.js"
  }
...

Dockerfile

FROM node:4

RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app

COPY package.json /usr/src/app/
RUN npm install

COPY . /usr/src/app

CMD [ "npm", "run", "test:mocha" ]

Run the test through the cappu command

$ cappu npm test

Tests

Install docker before running:

$ npm test
0.1.3

8 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago