continue-custom/core/test/vitest.global-setup.ts
Nate 68d2702077 fix(ci): sync vscode lockfile, fix core type error, run prettier
- Regenerate extensions/vscode/package-lock.json so `npm ci` is in sync
  (fixes vscode-checks, vscode-get-test-file-matrix,
  vscode-package-extension-linux, build-and-upload-vsix, jetbrains-tests)
- Replace deprecated fs.rmdirSync(..., {recursive}) with fs.rmSync in core
  test global setup (fixes core-checks tsc TS2554)
- Apply prettier formatting to README.md and core test setup files
  (fixes prettier-check)

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-06 18:04:28 -07:00

14 lines
501 B
TypeScript

import fs from "fs";
import path from "path";
// Sets up the GLOBAL directory for testing - equivalent to ~/.continue
// IMPORTANT: the CONTINUE_GLOBAL_DIR environment variable is used in utils/paths for getting all local paths
export default async function () {
process.env.CONTINUE_GLOBAL_DIR = path.join(__dirname, ".continue-test");
if (fs.existsSync(process.env.CONTINUE_GLOBAL_DIR)) {
fs.rmSync(process.env.CONTINUE_GLOBAL_DIR, {
recursive: true,
force: true,
});
}
}