thelounge/test/fixtures/env.ts

18 lines
477 B
TypeScript
Raw Normal View History

"use strict";
2022-05-03 08:16:34 +02:00
import fs from "fs";
2022-05-03 08:16:34 +02:00
import * as path from "path";
const home = path.join(__dirname, ".thelounge");
2022-05-03 08:16:34 +02:00
import config from "../../src/config";
config.setHome(home);
2022-05-03 08:16:34 +02:00
import STSPolicies from "../../src/plugins/sts"; // Must be imported *after* setHome
const mochaGlobalTeardown = async function () {
STSPolicies.refresh.cancel(); // Cancel debounced function, so it does not write later
fs.unlinkSync(STSPolicies.stsFile);
};
2022-05-03 08:16:34 +02:00
export default mochaGlobalTeardown;