Files
electron/spec-main/spec-helpers.ts
Milan Burda 30cb2b134b test: make sure tests fail properly instead of timing out (#24372)
* test: use delay() helper (#24321)

* test: make sure tests fail properly instead of timing out (#24316)

* test: remove defer()

Co-authored-by: Milan Burda <miburda@microsoft.com>
2020-07-03 18:55:56 -07:00

5 lines
257 B
TypeScript

export const ifit = (condition: boolean) => (condition ? it : it.skip);
export const ifdescribe = (condition: boolean) => (condition ? describe : describe.skip);
export const delay = (time: number = 0) => new Promise(resolve => setTimeout(resolve, time));