mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-29 04:53:44 -05:00
9075c82b88
[server-ce] make tests more robust GitOrigin-RevId: f070b8bbbf87842a69d88ca56cecf5dd0f3a286c
8 lines
215 B
TypeScript
8 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()
|
|
})
|
|
}
|