const{ waitFor }=require('sat-utils')waitFor.setDefaultOpts({timeout: 2500,// default waiting time is 2500 msinterval: 250,// default re-check condition interval time is 250 msmessage: 'Failed',// default error message is "Failed"waiterError: TypeError,// default error is TypeError});test()asyncfunctiontest(){awaitwaitFor(async()=>{constresult=awaitsomeAsyncLogic()returnresult;})}test1()asyncfunctiontest1(){awaitwaitFor(async()=>{constresult=awaitsomeAsyncLogic()returnresult;},{analyseResult: (result)=>result.status===200;
timeout: 25000,interval: 250,message: (time)=>thrownewError(`My custom error throw function with time ${time}`)})}Uh oh!
There was an error while loading. Please reload this page.
Latest commit
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|