mirror of
https://github.com/Wolvan/poll.horse.git
synced 2024-11-22 13:07:58 +01:00
8bc3f7fe36
This code serves as an application framework of sorts and is totally not stolen from some of my other projects.
17 lines
493 B
TypeScript
17 lines
493 B
TypeScript
"use strict";
|
|
|
|
import fs from "fs-extra";
|
|
import { TEST_DIRECTORY } from "./const";
|
|
|
|
console.log("Setting up Mocha Tests");
|
|
|
|
export async function mochaGlobalSetup(): Promise<void> {
|
|
console.log(`Setting up TEST_DIRECTORY '${TEST_DIRECTORY}'`);
|
|
await fs.remove(TEST_DIRECTORY);
|
|
await fs.mkdirp(TEST_DIRECTORY);
|
|
}
|
|
|
|
export async function mochaGlobalTeardown(): Promise<void> {
|
|
console.log(`Cleaning up TEST_DIRECTORY '${TEST_DIRECTORY}'`);
|
|
await fs.remove(TEST_DIRECTORY);
|
|
}
|