Skip to content

Commit c4151ce

Browse files
[Backport 8.16] Upgrade tap to latest (#2401)
Co-authored-by: Josh Mock <[email protected]>
1 parent f3aedc7 commit c4151ce

File tree

3 files changed

+12
-15
lines changed

3 files changed

+12
-15
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,5 @@ test/bundlers/parcel-test/.parcel-cache
6565
lib
6666
junit-output
6767
bun.lockb
68+
test-results
69+
processinfo

package.json

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
"semver": "^7.3.7",
7979
"split2": "^4.1.0",
8080
"stoppable": "^1.1.0",
81-
"tap": "^16.1.0",
81+
"tap": "^21.0.1",
8282
"ts-node": "^10.7.0",
8383
"ts-standard": "^11.0.0",
8484
"typescript": "^4.6.4",
@@ -91,11 +91,8 @@
9191
"tslib": "^2.4.0"
9292
},
9393
"tap": {
94-
"ts": true,
95-
"jsx": false,
96-
"flow": false,
97-
"coverage": false,
98-
"check-coverage": false,
99-
"files": "test/unit/{*,**/*}.test.ts"
94+
"files": [
95+
"test/unit/{*,**/*}.test.ts"
96+
]
10097
}
10198
}

test/unit/client.test.ts

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -293,14 +293,12 @@ test('Elastic Cloud config', t => {
293293
})
294294

295295
t.ok(client.connectionPool instanceof CloudConnectionPool)
296-
t.match(client.connectionPool.connections.find(c => c.id === 'https://abcd.localhost/'), {
297-
url: new URL('https://elastic:[email protected]'),
298-
id: 'https://abcd.localhost/',
299-
headers: {
300-
authorization: 'Basic ' + Buffer.from('elastic:changeme').toString('base64')
301-
},
302-
tls: { secureProtocol: 'TLSv1_2_method' }
303-
})
296+
const connection = client.connectionPool.connections.find(c => c.id === 'https://abcd.localhost/')
297+
298+
t.equal(connection?.headers?.authorization, `Basic ${Buffer.from('elastic:changeme').toString('base64')}`)
299+
t.same(connection?.tls, { secureProtocol: 'TLSv1_2_method' })
300+
t.equal(connection?.url.hostname, 'abcd.localhost')
301+
t.equal(connection?.url.protocol, 'https:')
304302

305303
t.end()
306304
})

0 commit comments

Comments
 (0)