Add support for a global context option (#1256)

This commit is contained in:
Tomas Della Vedova
2020-07-13 14:36:53 +02:00
committed by delvedor
parent 28f2be397c
commit d73cb1a29b
16 changed files with 2995 additions and 1776 deletions

View File

@ -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'
})
)