Updated test

This commit is contained in:
delvedor
2018-12-12 16:49:06 +01:00
parent b91b1ad1de
commit a86a552a85
5 changed files with 99 additions and 9 deletions

View File

@ -26,6 +26,18 @@ client.index({
body: { hello: 'world' }
}, (err: Error | null, result: ApiResponse) => {})
// request options
client.index({
index: 'test',
type: 'test',
id: 'test',
body: { hello: 'world' }
}, {
maxRetries: 2,
ignore: [404],
requestTimeout: 2000
}, (err: Error | null, result: ApiResponse) => {})
// Promises
client.info()
.then((result: ApiResponse) => {})
@ -39,3 +51,17 @@ client.index({
})
.then((result: ApiResponse) => {})
.catch((err: Error) => {})
// request options
client.index({
index: 'test',
type: 'test',
id: 'test',
body: { hello: 'world' }
}, {
maxRetries: 2,
ignore: [404],
requestTimeout: 2000
})
.then((result: ApiResponse) => {})
.catch((err: Error) => {})