* test(cli): isolate GlobalContext to fix flaky model-persistence tests The model-persistence test files set process.env.CONTINUE_GLOBAL_DIR in beforeEach to isolate their GlobalContext store, but core/util/paths.ts resolves CONTINUE_GLOBAL_DIR into a module-level constant at import time, so those per-test reassignments had no effect. As a result every test file (across parallel Vitest worker processes) read/wrote the same globalContext.json on disk, racing each other and intermittently failing "should clear model selection when set to null". Add a dedicated first setup file (vitest.global-dir-setup.ts) that creates a unique temp dir via fs.mkdtemp and sets CONTINUE_GLOBAL_DIR before any module imports paths.ts, giving each worker process its own isolated GlobalContext. Wire it in as the first entry in setupFiles and stop hardcoding the shared /tmp/continue-test dir in vitest.setup.ts. Co-authored-by: Cursor <cursoragent@cursor.com> * style(cli): remove blank line in array to fix prettier-check Pre-existing prettier-check failure on main: a blank line inside the `screens` array literal in NavigationContext.test.tsx is removed by the Prettier version CI runs. Drop the blank line so the file is formatted. Co-authored-by: Cursor <cursoragent@cursor.com> * chore: retrigger CI Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: Cursor <cursoragent@cursor.com>
30 lines
813 B
JSON
30 lines
813 B
JSON
{
|
|
"compilerOptions": {
|
|
"target": "ESNext",
|
|
"module": "NodeNext",
|
|
"moduleResolution": "NodeNext",
|
|
"useDefineForClassFields": true,
|
|
"lib": ["DOM", "ESNext"],
|
|
"allowJs": true,
|
|
"skipLibCheck": true,
|
|
"esModuleInterop": true,
|
|
"allowSyntheticDefaultImports": true,
|
|
"strict": true,
|
|
"forceConsistentCasingInFileNames": true,
|
|
"resolveJsonModule": true,
|
|
"isolatedModules": true,
|
|
"noEmitOnError": false,
|
|
"types": ["node", "vitest/globals"],
|
|
"outDir": "dist",
|
|
"declaration": true,
|
|
"sourceMap": true,
|
|
"inlineSources": true,
|
|
"jsx": "react",
|
|
"baseUrl": ".",
|
|
"paths": {
|
|
"core/*": ["../../core/dist/*"],
|
|
"core": ["../../core/dist/index.js"]
|
|
}
|
|
},
|
|
"include": ["src/**/*", "vitest.setup.ts", "vitest.global-dir-setup.ts"]
|
|
}
|