Skip to content

Commit dea1b2c

Browse files
committed
Make tests resilient to new Node default connection header changes
It seems that Node v20.5.1 sets this to keep-alive by default, but not in all environments? Seeing keep-alive in GitHub but not locally with the same release. Doesn't matter for this test, best to just ignore it.
1 parent 2f41556 commit dea1b2c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/integration/subscriptions/request-events.spec.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ const INCONSISTENT_HEADERS = [
2626
'origin',
2727
'referer',
2828

29+
// Varies on browser vs various Node versions:
30+
'connection',
31+
2932
// Varies on OS config:
3033
'accept-language',
3134

@@ -69,7 +72,6 @@ describe("Request initiated subscriptions", () => {
6972

7073
const matchableHeaders = _.omit(seenRequest.headers, INCONSISTENT_HEADERS);
7174
expect(matchableHeaders).to.deep.equal({
72-
'connection': isNode ? 'close' : 'keep-alive',
7375
'accept': '*/*',
7476
'content-length': '9',
7577
'content-type': 'text/plain;charset=UTF-8',
@@ -166,7 +168,6 @@ describe("Request initiated subscriptions", () => {
166168

167169
const matchableHeaders = _.omit(seenRequest.headers, INCONSISTENT_HEADERS);
168170
expect(matchableHeaders).to.deep.equal({
169-
'connection': isNode ? 'close' : 'keep-alive',
170171
'accept': '*/*',
171172
'content-length': '9',
172173
'content-type': 'text/plain;charset=UTF-8',

0 commit comments

Comments
 (0)