mirror of
https://github.com/0rangebananaspy/authelia.git
synced 2024-09-14 22:47:21 +07:00
22 lines
513 B
TypeScript
22 lines
513 B
TypeScript
import sleep from '../utils/sleep';
|
|
|
|
export default function WithEnvironment(suite: string, waitTimeout: number = 5000) {
|
|
var { setup, teardown } = require(`../../suites/${suite}/environment`);
|
|
|
|
before(async function() {
|
|
this.timeout(30000);
|
|
|
|
console.log('Preparing environment...');
|
|
await setup();
|
|
await sleep(waitTimeout);
|
|
});
|
|
|
|
after(async function() {
|
|
this.timeout(30000);
|
|
|
|
console.log('Stopping environment...');
|
|
await teardown();
|
|
|
|
await sleep(waitTimeout);
|
|
});
|
|
} |