mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
9 lines
215 B
TypeScript
9 lines
215 B
TypeScript
|
export function beforeWithReRunOnTestRetry(fn: () => void | Promise<any>) {
|
||
|
let ranOnce = false
|
||
|
beforeEach(() => {
|
||
|
if (ranOnce && Cypress.currentRetry === 0) return
|
||
|
ranOnce = true
|
||
|
return fn()
|
||
|
})
|
||
|
}
|