Skip to content

Commit 635142e

Browse files
author
Andrey
authored
Merge pull request #7 from kulikov/patch-1
Add "timeout" argument for sendRequestUntil() method
2 parents db49ba4 + 2ed6103 commit 635142e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,8 @@ class HTTP extends Helper {
148148
return utils.seeDataHasValidJsonSchema(schema, params, data);
149149
}
150150

151-
sendRequestUntil(requestPath, method = 'GET', options = {}, predicate, domain) {
152-
return utils.waitUntil(() => this.sendRequest(requestPath, method, options, domain).then(predicate), 2000, `http request wait ${requestPath} with ${predicate}`, 250);
151+
sendRequestUntil(requestPath, method = 'GET', options = {}, predicate, domain, timeout = 2000) {
152+
return utils.waitUntil(() => this.sendRequest(requestPath, method, options, domain).then(predicate), timeout, `http request wait ${requestPath} with ${predicate}`, 250);
153153
}
154154
}
155155

0 commit comments

Comments
 (0)