From 807d4ad33f97a265b55de7cb25c2ca85a1e19ae9 Mon Sep 17 00:00:00 2001 From: Kelvin Jin Date: Thu, 17 May 2018 10:28:12 -0700 Subject: [PATCH] fix: fixup for node 8.11.2 (#755) PR-URL: #755 --- test/plugins/test-trace-http2.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/plugins/test-trace-http2.ts b/test/plugins/test-trace-http2.ts index 5fc6cf8b3..0bc27342f 100644 --- a/test/plugins/test-trace-http2.ts +++ b/test/plugins/test-trace-http2.ts @@ -222,8 +222,9 @@ describe('test-trace-http2', () => { // In Node 9.9+, the error handler is not added by default. s.on('error', () => {}); setTimeout(() => { - if (semver.satisfies(process.version, '>=9.4')) { - // Node 9.4 removed rstWithInternalError() and uses added close(). + if (semver.satisfies(process.version, '^8.11||>=9.4')) { + // Node 8.11/9.4 removed rstWithInternalError() in favor of new + // close() function. s.close(http2.constants.NGHTTP2_INTERNAL_ERROR); } else { s.rstWithInternalError();