Commit a054c6d
committed
fix(cli): fix test isolation for model-persistence tests
Mock core/util/paths.js to read CONTINUE_GLOBAL_DIR dynamically instead
of caching it at module load time. This fixes test isolation issues where
tests running in parallel would share the same GlobalContext file path.
Root cause: The CONTINUE_GLOBAL_DIR constant in core/util/paths.ts is
computed via an IIFE at module load time. When tests set different temp
directories in beforeEach, the module had already cached the original value.
Solution: Mock getContinueGlobalPath, getIndexFolderPath, and
getGlobalContextFilePath to read process.env.CONTINUE_GLOBAL_DIR on
each call, allowing proper test isolation.
Also fixes prettier formatting in markdown files.
Authored by: Aaron Lippold<lippold@gmail.com>1 parent d90c4eb commit a054c6d
1 file changed
+39
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
1 | 4 | | |
2 | 5 | | |
3 | 6 | | |
| |||
6 | 9 | | |
7 | 10 | | |
8 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
9 | 48 | | |
10 | 49 | | |
11 | 50 | | |
| |||
0 commit comments