Skip to content

Commit

Permalink
Upgrade tap to latest (#2400)
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshMock authored Oct 24, 2024
1 parent 8e79bf8 commit 86b4d4e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 15 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,5 @@ test/bundlers/parcel-test/.parcel-cache
lib
junit-output
bun.lockb
test-results
processinfo
11 changes: 4 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"semver": "^7.3.7",
"split2": "^4.1.0",
"stoppable": "^1.1.0",
"tap": "^16.1.0",
"tap": "^21.0.1",
"ts-node": "^10.7.0",
"ts-standard": "^11.0.0",
"typescript": "^4.6.4",
Expand All @@ -92,11 +92,8 @@
"tslib": "^2.4.0"
},
"tap": {
"ts": true,
"jsx": false,
"flow": false,
"coverage": false,
"check-coverage": false,
"files": "test/unit/{*,**/*}.test.ts"
"files": [
"test/unit/{*,**/*}.test.ts"
]
}
}
14 changes: 6 additions & 8 deletions test/unit/client.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -293,14 +293,12 @@ test('Elastic Cloud config', t => {
})

t.ok(client.connectionPool instanceof CloudConnectionPool)
t.match(client.connectionPool.connections.find(c => c.id === 'https://abcd.localhost/'), {
url: new URL('https://elastic:[email protected]'),
id: 'https://abcd.localhost/',
headers: {
authorization: 'Basic ' + Buffer.from('elastic:changeme').toString('base64')
},
tls: { secureProtocol: 'TLSv1_2_method' }
})
const connection = client.connectionPool.connections.find(c => c.id === 'https://abcd.localhost/')

t.equal(connection?.headers?.authorization, `Basic ${Buffer.from('elastic:changeme').toString('base64')}`)
t.same(connection?.tls, { secureProtocol: 'TLSv1_2_method' })
t.equal(connection?.url.hostname, 'abcd.localhost')
t.equal(connection?.url.protocol, 'https:')

t.end()
})
Expand Down

0 comments on commit 86b4d4e

Please sign in to comment.