From f4ff1006b9e71eb4185a3edf03333dbe514a84c9 Mon Sep 17 00:00:00 2001 From: Jarrett Cruger Date: Thu, 19 Apr 2018 16:10:05 -0400 Subject: [PATCH] [wip] proper tests and reporting --- .gitignore | 1 + .travis.yml | 6 ++++-- README.md | 9 ++------- package.json | 4 ++-- 4 files changed, 9 insertions(+), 11 deletions(-) diff --git a/.gitignore b/.gitignore index 347bedbb4..02593a904 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ primus-proxy.js tes.js npm-debug.log .nyc_output +coverage diff --git a/.travis.yml b/.travis.yml index c687bb062..956c0fcbe 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,10 +3,12 @@ language: node_js node_js: - "6" - "8" - script: - npm test - +after_success: + - bash <(curl -s https://codecov.io/bash) +matrix: + fast_finish: true notifications: email: - travis@nodejitsu.com diff --git a/README.md b/README.md index 40367e111..c66a58aa2 100644 --- a/README.md +++ b/README.md @@ -5,12 +5,7 @@ node-http-proxy ======= -

- -    - - -

+[![Build Status](https://travis-ci.org/nodejitsu/node-http-proxy.svg?branch=master)](https://travis-ci.org/nodejitsu/node-http-proxy) `node-http-proxy` is an HTTP programmable proxying library that supports websockets. It is suitable for implementing components such as reverse @@ -341,7 +336,7 @@ proxyServer.listen(8015); * **cookieDomainRewrite**: rewrites domain of `set-cookie` headers. Possible values: * `false` (default): disable cookie rewriting * String: new domain, for example `cookieDomainRewrite: "new.domain"`. To remove the domain, use `cookieDomainRewrite: ""`. - * Object: mapping of domains to new domains, use `"*"` to match all domains. + * Object: mapping of domains to new domains, use `"*"` to match all domains. For example keep one domain unchanged, rewrite one domain and remove other domains: ``` cookieDomainRewrite: { diff --git a/package.json b/package.json index 950cbfea0..8950610ff 100644 --- a/package.json +++ b/package.json @@ -27,8 +27,8 @@ "ws": "^0.8.0" }, "scripts": { - "test": "mocha test/*-test.js", - "test-cov": "nyc npm test" + "mocha": "mocha test/*-test.js", + "test": "nyc --reporter=text --reporter=lcov npm run mocha" }, "engines": { "node": ">=4.0.0"