Skip to content
This repository has been archived by the owner on Oct 22, 2021. It is now read-only.

Commit

Permalink
Merge pull request #54 from dblock/test-coverage
Browse files Browse the repository at this point in the history
Added test coverage.
  • Loading branch information
ashkan18 committed Jan 9, 2017
2 parents f038ad5 + 2e343d0 commit 961d8c0
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ node_modules
project.production.json
.env.json
.DS_Store
coverage
8 changes: 7 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
language: node_js

node_js:
- "4.3"
- 4.3

before_script:
- npm run-script danger

script:
- make coverage

after_script:
- cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js

email: false
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

### 0.3.1 (Next)

* [#54](https://github.com/artsy/elderfield/pull/54): Added test code coverage - [@dblock](https://github.com/dblock).
* Your contribution here.

### 0.3.0 (2017/1/9)
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,9 @@ deploy: build
test: build
ENV=test $(KEYS) ./node_modules/mocha/bin/mocha

# Test
coverage: build
ENV=test $(KEYS) npm run coverage

production-deploy: build
apex deploy --env=production
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Elderfield

[![Build Status](https://travis-ci.org/artsy/elderfield.svg?branch=master)](https://travis-ci.org/artsy/elderfield)
[![Coverage Status](https://coveralls.io/repos/github/artsy/elderfield/badge.svg?branch=master)](https://coveralls.io/github/artsy/elderfield?branch=master)

[![](images/echo-dot-2nd-gen.jpg)](https://developer.amazon.com/alexa)

Expand Down
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
"scripts": {
"start": "make s",
"test": "make test",
"danger": "./node_modules/.bin/danger"
"danger": "./node_modules/.bin/danger",
"coverage": "./node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha -- -R spec"
},
"dependencies": {
"alexa-app-server": "2.2.4"
Expand All @@ -26,6 +27,8 @@
"chai-http": "3.0.0",
"chai-string": "1.3.0",
"danger": "0.7.5",
"jest-environment-node": "18.0.0"
"jest-environment-node": "18.0.0",
"istanbul": "0.4.5",
"coveralls": "^2.11.15"
}
}
3 changes: 3 additions & 0 deletions test/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,7 @@ expect = chai.expect;
chai.use(require('chai-string'));
chai.use(require('chai-http'));

// for code coverage instrumentation
require('../functions/artsy/index.js');

server = require('../server');

0 comments on commit 961d8c0

Please sign in to comment.