mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
5a1cff55bc
[server-pro] tests: add tests for templates feature GitOrigin-RevId: b36482af924e306207cbdedc1a8d1d548272ee77
22 lines
460 B
TypeScript
22 lines
460 B
TypeScript
import { reconfigure } from './hostAdminClient'
|
|
|
|
let lastConfig: string
|
|
|
|
export function startWith({
|
|
pro = false,
|
|
version = 'latest',
|
|
vars = {},
|
|
varsFn = () => ({}),
|
|
}) {
|
|
before(async function () {
|
|
Object.assign(vars, varsFn())
|
|
const cfg = JSON.stringify({ pro, version, vars })
|
|
if (lastConfig === cfg) return
|
|
|
|
this.timeout(100 * 1000)
|
|
await reconfigure({ pro, version, vars })
|
|
lastConfig = cfg
|
|
})
|
|
}
|
|
|
|
export { reconfigure }
|