Added proxy support (#1260)
This commit is contained in:
committed by
GitHub
parent
629894adba
commit
26238634a7
@ -692,3 +692,28 @@ expectError<errors.ConfigurationError>(
|
||||
context: 'hello world'
|
||||
})
|
||||
)
|
||||
|
||||
/**
|
||||
* `proxy` option
|
||||
*/
|
||||
expectType<Client>(
|
||||
new Client({
|
||||
node: 'http://localhost:9200',
|
||||
proxy: 'http://localhost:8080'
|
||||
})
|
||||
)
|
||||
|
||||
expectType<Client>(
|
||||
new Client({
|
||||
node: 'http://localhost:9200',
|
||||
proxy: new URL('http://localhost:8080')
|
||||
})
|
||||
)
|
||||
|
||||
expectError<errors.ConfigurationError>(
|
||||
// @ts-expect-error
|
||||
new Client({
|
||||
node: 'http://localhost:9200',
|
||||
proxy: 42
|
||||
})
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user