2016-10-09 21:14:02 +02:00
|
|
|
"use strict";
|
|
|
|
|
2022-05-03 08:16:34 +02:00
|
|
|
import fs from "fs";
|
2022-02-13 14:21:40 +01:00
|
|
|
|
2022-05-03 08:16:34 +02:00
|
|
|
import * as path from "path";
|
|
|
|
const home = path.join(__dirname, ".thelounge");
|
2022-02-13 14:21:40 +01:00
|
|
|
|
2022-05-03 08:16:34 +02:00
|
|
|
import config from "../../src/config";
|
|
|
|
config.setHome(home);
|
2022-02-13 14:21:40 +01:00
|
|
|
|
2022-05-03 08:16:34 +02:00
|
|
|
import STSPolicies from "../../src/plugins/sts"; // Must be imported *after* setHome
|
|
|
|
const mochaGlobalTeardown = async function () {
|
2022-02-13 14:21:40 +01:00
|
|
|
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;
|