Add support for a global context option (#1256)
This commit is contained in:
committed by
GitHub
parent
1a7727588e
commit
39cf023426
@ -623,3 +623,20 @@ expectError<errors.ConfigurationError>(
|
||||
})
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* `context` option
|
||||
*/
|
||||
expectType<Client>(
|
||||
new Client({
|
||||
node: 'http://localhost:9200',
|
||||
context: { hello: 'world' }
|
||||
})
|
||||
)
|
||||
|
||||
expectError<errors.ConfigurationError>(
|
||||
new Client({
|
||||
node: 'http://localhost:9200',
|
||||
context: 'hello world'
|
||||
})
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user