| 1 | import fs from "fs"; |
| 2 | import path from "path"; |
| 3 | |
| 4 | // Sets up the GLOBAL directory for testing - equivalent to ~/.continue |
| 5 | // IMPORTANT: the CONTINUE_GLOBAL_DIR environment variable is used in utils/paths for getting all local paths |
| 6 | export default async function () { |
| 7 | process.env.CONTINUE_GLOBAL_DIR = path.join(__dirname, ".continue-test"); |
| 8 | if (fs.existsSync(process.env.CONTINUE_GLOBAL_DIR)) { |
| 9 | fs.rmdirSync(process.env.CONTINUE_GLOBAL_DIR, { recursive: true }); |
| 10 | } |
| 11 | } |