Commit ed03395
committed
🤖 Fix integration test race condition in AI SDK provider imports
Restore preloadAISDKProviders() functionality to eagerly load @ai-sdk/anthropic
and @ai-sdk/openai modules before tests run concurrently. This prevents Jest's
module sandboxing from blocking dynamic imports with 'You are trying to import
a file outside of the scope of the test code' errors.
The function was previously converted to a no-op under the assumption that
'Jest concurrency has been stabilized elsewhere', but tests still failed when
run together. Preloading ensures providers are in the module cache before
concurrent tests access them via dynamic imports in createModel().
Also add note to AGENTS.md warning that tests/ipcMain takes a long time locally.1 parent e951624 commit ed03395
File tree
3 files changed
+18
-10
lines changed- docs
- src/services
- tests/ipcMain
3 files changed
+18
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
205 | 205 | | |
206 | 206 | | |
207 | 207 | | |
| 208 | + | |
208 | 209 | | |
209 | 210 | | |
210 | 211 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
100 | | - | |
101 | 100 | | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
| 101 | + | |
| 102 | + | |
106 | 103 | | |
107 | 104 | | |
108 | 105 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
25 | 26 | | |
26 | | - | |
27 | | - | |
28 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
29 | 33 | | |
30 | 34 | | |
31 | 35 | | |
| |||
300 | 304 | | |
301 | 305 | | |
302 | 306 | | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
303 | 310 | | |
304 | 311 | | |
305 | 312 | | |
| |||
370 | 377 | | |
371 | 378 | | |
372 | 379 | | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
373 | 383 | | |
374 | 384 | | |
375 | 385 | | |
| |||
0 commit comments