Skip to content

Commit ede421f

Browse files
author
Tom Kirkpatrick
committed
Add coverage/coveralls support
1 parent 6695821 commit ede421f

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Loopback Finite State Machine
22

3+
[![Circle CI](https://circleci.com/gh/fullcube/loopback-component-fsm.svg?style=svg)](https://circleci.com/gh/fullcube/loopback-component-fsm) [![Dependencies](http://img.shields.io/david/fullcube/loopback-component-fsm.svg?style=flat)](https://david-dm.org/fullcube/loopback-component-fsm) [![Coverage Status](https://coveralls.io/repos/github/fullcube/loopback-component-fsm/badge.svg?branch=master)](https://coveralls.io/github/fullcube/loopback-component-fsm?branch=master)
4+
5+
36
This loopback component provides a finite state machine (powered by https://github.com/vstirbu/fsm-as-promised) for loopback model instances, enabling precise control over when model instance methods may be called.
47

58
### Installation

circle.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
test:
2+
post:
3+
- npm run coverage

package.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,23 @@
55
"main": "index.js",
66
"scripts": {
77
"dev": "DEBUG=loopback:component:fsm nodemon test/fullcube-state-machine/server/server.js --ignore db.json --ext js,json",
8-
"test": "mocha",
9-
"test:watch": "npm run test -- -w"
8+
"test": "babel-node ./node_modules/.bin/isparta cover --report text --report lcov _mocha test/*test.js",
9+
"quicktest": "mocha test/*test.js",
10+
"test:watch": "npm run test -- -w",
11+
"coverage": "cat ./coverage/lcov.info | coveralls"
1012
},
1113
"author": "",
1214
"license": "ISC",
1315
"devDependencies": {
16+
"babel-cli": "^6.10.1",
1417
"babel-core": "^6.10.4",
1518
"babel-eslint": "^6.1.0",
1619
"babel-polyfill": "^6.9.1",
1720
"babel-preset-es2015": "^6.9.0",
1821
"chai": "^3.5.0",
22+
"coveralls": "^2.11.9",
1923
"eslint-config-fullcube": "git+https://github.com/fullcube/eslint-config-fullcube.git",
24+
"isparta": "^4.0.0",
2025
"mocha": "^2.5.3",
2126
"nodemon": "^1.9.2",
2227
"sinon": "^1.17.4",

0 commit comments

Comments
 (0)