diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..55c9c1f --- /dev/null +++ b/.travis.yml @@ -0,0 +1,8 @@ +language: node_js +node_js: + - node + - 0.10 +script: + - npm run lint + - npm run test + - npm run test-coverage && cat coverage/lcov.info | ./node_modules/.bin/coveralls && rm -rf coverage diff --git a/README.md b/README.md index 1788b40..8d333a3 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,6 @@ +[![Build Status](https://travis-ci.org/Rob--W/cors-anywhere.svg?branch=master)](https://travis-ci.org/Rob--W/cors-anywhere) +[![Coverage Status](https://coveralls.io/repos/github/Rob--W/cors-anywhere/badge.svg?branch=master)](https://coveralls.io/github/Rob--W/cors-anywhere?branch=master) + **CORS Anywhere** is a NodeJS proxy which adds CORS headers to the proxied request. The url to proxy is literally taken from the path, validated and proxied. The protocol diff --git a/package.json b/package.json index 3070b87..b4554b3 100644 --- a/package.json +++ b/package.json @@ -26,14 +26,17 @@ "requires-port": "1.0.0" }, "devDependencies": { + "coveralls": "^2.11.6", "eslint": "^2.2.0", + "istanbul": "^0.4.2", "mocha": "~2.2.4", "nock": "~1.9.0", "supertest": "~0.15.0" }, "scripts": { "lint": "eslint .", - "test": "./node_modules/.bin/mocha ./test/test*.js --reporter spec" + "test": "mocha ./test/test*.js --reporter spec", + "test-coverage": "istanbul cover ./node_modules/.bin/_mocha -- test/test.js --reporter spec" }, "engines": { "node": ">=0.6.6",