aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkumavis <kumavis@users.noreply.github.com>2017-07-26 08:46:23 +0800
committerGitHub <noreply@github.com>2017-07-26 08:46:23 +0800
commita8525d4b17275e8e1a0d9b8d85d57ee58efe899a (patch)
tree75d6d24d7d7b5bf7b841b7eb3fd5ebc26397e7f6
parent4e9cfc935dc86f7f0be99249be99cb18bd998b83 (diff)
parent3575bd49ab4f3ec879a3e04b4a6fa35fe9c67c6e (diff)
downloadtangerine-wallet-browser-a8525d4b17275e8e1a0d9b8d85d57ee58efe899a.tar
tangerine-wallet-browser-a8525d4b17275e8e1a0d9b8d85d57ee58efe899a.tar.gz
tangerine-wallet-browser-a8525d4b17275e8e1a0d9b8d85d57ee58efe899a.tar.bz2
tangerine-wallet-browser-a8525d4b17275e8e1a0d9b8d85d57ee58efe899a.tar.lz
tangerine-wallet-browser-a8525d4b17275e8e1a0d9b8d85d57ee58efe899a.tar.xz
tangerine-wallet-browser-a8525d4b17275e8e1a0d9b8d85d57ee58efe899a.tar.zst
tangerine-wallet-browser-a8525d4b17275e8e1a0d9b8d85d57ee58efe899a.zip
Merge pull request #1816 from MetaMask/test-coverage
Test coverage
-rw-r--r--.gitignore5
-rw-r--r--README.md2
-rw-r--r--circle.yml3
-rw-r--r--package.json4
4 files changed, 12 insertions, 2 deletions
diff --git a/.gitignore b/.gitignore
index 85c2d15d6..1806b1932 100644
--- a/.gitignore
+++ b/.gitignore
@@ -24,4 +24,7 @@ test/background.js
test/bundle.js
test/test-bundle.js
-notes.txt \ No newline at end of file
+notes.txt
+
+.coveralls.yml
+.nyc_output \ No newline at end of file
diff --git a/README.md b/README.md
index d7086ae91..27b19c91c 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-# MetaMask Plugin [![Build Status](https://circleci.com/gh/MetaMask/metamask-extension.svg?style=shield&circle-token=a1ddcf3cd38e29267f254c9c59d556d513e3a1fd)](https://circleci.com/gh/MetaMask/metamask-extension)
+# MetaMask Plugin [![Build Status](https://circleci.com/gh/MetaMask/metamask-extension.svg?style=shield&circle-token=a1ddcf3cd38e29267f254c9c59d556d513e3a1fd)](https://circleci.com/gh/MetaMask/metamask-extension) [![Coverage Status](https://coveralls.io/repos/github/MetaMask/metamask-extension/badge.svg?branch=master)](https://coveralls.io/github/MetaMask/metamask-extension)
## Support
diff --git a/circle.yml b/circle.yml
index 66eed17d7..2ea60bb9d 100644
--- a/circle.yml
+++ b/circle.yml
@@ -5,3 +5,6 @@ dependencies:
pre:
- "npm i -g testem"
- "npm i -g mocha"
+test:
+ override:
+ - "npm run ci" \ No newline at end of file
diff --git a/package.json b/package.json
index 9b582d3c9..dcd25cda6 100644
--- a/package.json
+++ b/package.json
@@ -13,6 +13,8 @@
"test-unit": "METAMASK_ENV=test mocha --require test/helper.js --recursive \"test/unit/**/*.js\"",
"single-test": "METAMASK_ENV=test mocha --require test/helper.js",
"test-integration": "npm run buildMock && npm run buildCiUnits && testem ci -P 2",
+ "test-coverage": "nyc npm run test-unit && nyc report --reporter=text-lcov | coveralls",
+ "ci": "npm run lint && npm run test-coverage && npm run test-integration",
"lint": "gulp lint",
"buildCiUnits": "node test/integration/index.js",
"watch": "mocha watch --recursive \"test/unit/**/*.js\"",
@@ -144,6 +146,7 @@
"brfs": "^1.4.3",
"browserify": "^13.0.0",
"chai": "^3.5.0",
+ "coveralls": "^2.13.1",
"deep-freeze-strict": "^1.1.1",
"del": "^2.2.0",
"envify": "^4.0.0",
@@ -170,6 +173,7 @@
"mocha-jsdom": "^1.1.0",
"mocha-sinon": "^1.1.5",
"nock": "^8.0.0",
+ "nyc": "^11.0.3",
"open": "0.0.5",
"prompt": "^1.0.0",
"qs": "^6.2.0",