Commit da239a1
refactor(test): run web tests on native parallel via injectable seams (#2307)
* fix(ci): restore green CI on main after parallel test merge
Declare transitive deps for Bun 1.3 isolated workspace installs and align
google-auth-library/gaxios versions so root type-check resolves express,
Google API, and web test types correctly.
Co-authored-by: Cursor <cursoragent@cursor.com>
* refactor(test): clean up post-Jest migration test infrastructure
Remove one-time Jest migration scripts and @types/jest, fix stale playbook
docs, split web.preload into setup modules, consolidate test launchers via
runner-utils, and add mongo-free :fast paths for backend/sync/scripts using
synthetic COMPASS_TEST_MONGO_URI env (no mongod boot).
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix(test): resolve merge issues and CI lint failures
Use main bun.lock for compatible bson/mongodb versions, fix bench comment
that prematurely closed a block comment, and apply biome formatting fixes.
Co-authored-by: Cursor <cursoragent@cursor.com>
* refactor(test): run web tests on native parallel via injectable seams
Replace preload mock.module clusters for session, toast, and Google auth with registry ports so web can use bun test --parallel like other packages, removing the per-file test-isolated launcher.
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix(web): re-mirror indexeddb globals after parallel isolate reset
Move globalThis mirroring out of the cached import promise so
ensureIndexedDbTestEnv re-applies fake-indexeddb when Bun --isolate
clears globals but the module-level indexedDbReady promise is settled.
* refactor(web): simplify web test infrastructure seams
Replace verbose session port binding with a typed cast, inline the toast
port default helper, and merge teardown afterAll hooks.
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix(test): harden indexeddb mirror and deflake calendar list toggle test
Re-mirror fake-indexeddb globals after Bun isolate clears them, route session-expired toast dismiss through the toast port, and wait for optimistic aria-pressed updates under CI contention.
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix(web): reset session provider singletons between tests
Parallel web test workers reuse module state, so sessionInit flags,
auth store, and onAnyEvent listeners must be cleared in afterEach
alongside other module-level stores.
* fix(scripts): restore 60s hook timeout for fast parallel test tiers
* fix(web): close SSE stream in resetSessionProviderForTests
* fix(test): reset BaseApi adapter and deflake CalendarList under parallel
Clear the shared axios adapter after every web test so parallel workers do not inherit stale mocks, and wait for optimistic toggle state with zero-delay userEvent.
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix(test): stabilize web suite in single-process runner
Run web tests sequentially to avoid MSW XHR isolate breakage, revert session provider reset that poisoned MSW, migrate AuthModal off mock.module for Google auth, and deflake calendar-list and reconnect-toast tests.
Co-authored-by: Cursor <cursoragent@cursor.com>
---------
Co-authored-by: Cursor <cursoragent@cursor.com>1 parent 403969e commit da239a1
37 files changed
Lines changed: 529 additions & 531 deletions
File tree
- docs/development
- packages
- scripts/src/testing
- web/src
- __tests__
- __mocks__
- helpers
- setup
- utils/storage
- auth
- compass/session
- google
- authorization
- util
- common/utils
- toast
- components
- AuthModal
- Sidebar/CalendarList
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
107 | | - | |
| 107 | + | |
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
59 | 63 | | |
60 | 64 | | |
61 | 65 | | |
62 | 66 | | |
63 | 67 | | |
64 | | - | |
| 68 | + | |
65 | 69 | | |
66 | 70 | | |
67 | 71 | | |
| |||
132 | 136 | | |
133 | 137 | | |
134 | 138 | | |
135 | | - | |
136 | | - | |
| 139 | + | |
| 140 | + | |
137 | 141 | | |
138 | 142 | | |
139 | 143 | | |
| |||
143 | 147 | | |
144 | 148 | | |
145 | 149 | | |
146 | | - | |
| 150 | + | |
147 | 151 | | |
148 | 152 | | |
149 | 153 | | |
| |||
152 | 156 | | |
153 | 157 | | |
154 | 158 | | |
155 | | - | |
| 159 | + | |
156 | 160 | | |
157 | 161 | | |
158 | 162 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
14 | 19 | | |
15 | 20 | | |
16 | 21 | | |
| |||
24 | 29 | | |
25 | 30 | | |
26 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
27 | 37 | | |
28 | 38 | | |
29 | 39 | | |
| |||
50 | 60 | | |
51 | 61 | | |
52 | 62 | | |
53 | | - | |
| 63 | + | |
54 | 64 | | |
55 | 65 | | |
56 | 66 | | |
| |||
61 | 71 | | |
62 | 72 | | |
63 | 73 | | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
64 | 84 | | |
65 | 85 | | |
66 | 86 | | |
67 | | - | |
| 87 | + | |
| 88 | + | |
68 | 89 | | |
69 | 90 | | |
70 | 91 | | |
| |||
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
0 commit comments