Skip to content

Commit d321eba

Browse files
committed
chore(test): add test coverage and ensure circleci runs coveralls.
chore(test): add test coverage and ensure circleci runs coveralls.
1 parent 14b4298 commit d321eba

File tree

4 files changed

+44
-3
lines changed

4 files changed

+44
-3
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
node_modules/
44
.idea/
55
.vscode/
6+
coverage/

appveyor.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# http://www.appveyor.com/docs/appveyor-yml
2+
3+
# Test against these versions of Node.js.
4+
environment:
5+
matrix:
6+
- nodejs_version: "0.12"
7+
- nodejs_version: "4.2"
8+
9+
# Install scripts. (runs after repo cloning)
10+
install:
11+
- git rev-parse HEAD
12+
# Get the latest stable version of Node 0.STABLE.latest
13+
- ps: Install-Product node $env:nodejs_version
14+
# Typical npm stuff.
15+
- npm version
16+
- npm install
17+
18+
cache:
19+
- '%APPDATA%\npm-cache'
20+
21+
# Post-install test scripts.
22+
test_script:
23+
# Output useful info for debugging.
24+
- npm version
25+
- cmd: npm run test
26+
27+
# Don't actually build.
28+
build: off
29+
30+
# Set build version format here instead of in the admin panel.
31+
version: "{build}"

circle.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
test:
2+
override:
3+
- nvm use 0.12 && npm test
4+
- nvm use 4.0 && npm test
5+
post:
6+
- npm run coveralls

package.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@
1414
"publish-tag": "node lib/tasks/bumpversion --level beta --npmPublishTag",
1515
"full-release": "node lib/tasks/bumpversion --npmInstall --git --npmPublish",
1616
"test": "npm run jasmine",
17-
"e2e": "jasmine-node --captureExceptions ./e2e",
18-
"jasmine": "jasmine-node --captureExceptions ./spec"
17+
"coveralls": "istanbul cover node_modules/jasmine-node/bin/jasmine-node --captureExceptions spec/ && cat coverage/lcov.info | node_modules/coveralls/bin/coveralls.js && rm -rf coverage",
18+
"e2e": "jasmine-node --captureExceptions e2e/",
19+
"jasmine": "jasmine-node --captureExceptions spec/"
1920
},
2021
"keywords": [
2122
"ionic",
@@ -88,8 +89,10 @@
8889
"xml2js": "0.4.4"
8990
},
9091
"devDependencies": {
92+
"istanbul": "^0.4.3",
9193
"jasmine-node": "^1.14.5",
92-
"rewire": "^2.3.4"
94+
"rewire": "^2.3.4",
95+
"coveralls": "^2.2.0"
9396
},
9497
"bundledDependencies": [
9598
"async",

0 commit comments

Comments
 (0)