Skip to content

Commit 8ce1a61

Browse files
committed
Fix travis-CI scripts
1 parent e4afd79 commit 8ce1a61

File tree

8 files changed

+2307
-12
lines changed

8 files changed

+2307
-12
lines changed

.travis.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ before_install:
1919
# Setup Node.js version-specific dependencies
2020
- "test $TRAVIS_NODE_VERSION != '0.8' || npm rm --save-dev istanbul"
2121
- "test $(echo $TRAVIS_NODE_VERSION | cut -d. -f1) -ge 4 || npm rm --save-dev eslint"
22+
- "test -z $(echo $HTTP2_TEST) || npm install --only=dev https://github.com/sogaani/express.git#initial-support-http2 https://github.com/sogaani/supertest.git#http2"
2223
# Update Node.js modules
2324
- "test ! -d node_modules || npm prune"
2425
- "test ! -d node_modules || npm rebuild"
@@ -27,9 +28,11 @@ script:
2728
- "test ! -z $(npm -ps ls istanbul) || npm test"
2829
- "test -z $(npm -ps ls istanbul) || npm run-script test-ci"
2930
- "test -z $(npm -ps ls eslint) || npm run-script lint"
30-
# Run test script with http2
31-
- "test $(echo $TRAVIS_NODE_VERSION | cut -d. -f1) -ge 8 || npm install https://github.com/sogaani/express.git#initial-support-http2 https://github.com/sogaani/supertest.git#http2"
32-
- "test $(echo $TRAVIS_NODE_VERSION | cut -d. -f1) -ge 8 || npm test-http2"
33-
- "test $(echo $TRAVIS_NODE_VERSION | cut -d. -f1) -ge 8 || npm run-script test-http2-ci"
3431
after_script:
3532
- "test -e ./coverage/lcov.info && npm install coveralls@2 && cat ./coverage/lcov.info | coveralls"
33+
matrix:
34+
include:
35+
- node_js: "8.11"
36+
env: HTTP2_TEST=1
37+
- node_js: "10.7"
38+
env: HTTP2_TEST=1

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ Cookies.prototype.set = function(name, value, opts) {
116116
headers = pushCookie(headers, cookie)
117117
}
118118

119-
var protoSetHeader = http2 && res instanceof http2.Http2ServerResponse ?
119+
var protoSetHeader = http2 && res instanceof http2.Http2ServerResponse ?
120120
http2.Http2ServerResponse.prototype.setHeader : http.OutgoingMessage.prototype.setHeader;
121121
var setHeader = res.set ? protoSetHeader : res.setHeader
122122
setHeader.call(res, 'Set-Cookie', headers)

0 commit comments

Comments
 (0)