Commit efc383d
committed
fix(tests): resolve prompts module alias conflict
Added explicit alias for @socketsecurity/lib/prompts to prevent
module resolution from incorrectly loading src/stdio/prompts.ts
instead of src/prompts/index.ts stubs during test runs.
The issue occurred because:
- src/prompts/index.ts exports stub functions that throw errors
- src/stdio/prompts.ts exports actual inquirer-wrapped prompts
- Vitest's alias '@socketsecurity/lib' -> 'src' was causing
ambiguous resolution that loaded the wrong module
Fixed by adding specific alias that takes precedence:
'@socketsecurity/lib/prompts' -> 'src/prompts/index.ts'
This prevents prompts tests from timing out in CI.1 parent 6196eb6 commit efc383d
2 files changed
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
37 | 41 | | |
38 | 42 | | |
39 | 43 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
44 | 48 | | |
45 | 49 | | |
46 | 50 | | |
| |||
0 commit comments