export function delay (timeout) {
  return new Promise<void>(resolve => {
    setTimeout(resolve, timeout)
  })
}

// for some reason editor.action.triggerSuggest needs more delay at the beginning when the process is not yet warmed up
// let's start from high delays and then slowly go to lower delays
let delaySteps = [2000, 1200, 700, 400, 300, 200]

export const getCurrentDelay = () => (delaySteps.length > 1) ? delaySteps.shift() : delaySteps[0]

export function delay (timeout) {
  return new Promise<void>(resolve => {
    setTimeout(resolve, timeout)
  })
}

// for some reason editor.action.triggerSuggest needs more delay at the beginning when the process is not yet warmed up
// let's start from high delays and then slowly go to lower delays
let delaySteps = [2000, 1200, 700, 400, 300, 250]

export const getCurrentDelay = () => (delaySteps.length > 1) ? delaySteps.shift() : delaySteps[0]

Change in default test delay
Change in default test delay

There is still some randomness in executing the tests.
Bigger delays seem to mitigate that problem.
I can wait another second or two if that helps.
