Commit 03701e1
committed
test(e2e): address the Copilot review on the merged e2e PR
Three findings from the Copilot review of #984:
- server-env.test.ts assumed JLAB_DESKTOP_CONFIG_DIR was unset, so a developer
or CI with it set would fail the userData-dir assertion. Save and clear it in
beforeEach, restore in afterEach, so both cases are hermetic.
- start() polls the server URL via http/https.request and reschedules a 500ms
setTimeout retry; with no real server that left background timers and
connection attempts running after the assertions. Mock http/https so the poll
reports the server up immediately and nothing stays scheduled, and swallow the
now-resolving start() promise.
- the e2e install step only confirmed require('electron') resolved a path; add an
explicit test -x on the launcher (and keep the macOS framework test -f) so a
dropped or non-executable binary fails the step with a clear error.
Note: AI-assisted (Claude Code). Manually verified: the two server-env tests
pass in ~0.3s with no hang, full unit suite 432 pass (eslint/tsc deferred to CI:
this branch is off master's TS 4.2 / ESLint 8 and the local node_modules is on
the Electron-42 branch's toolchain).1 parent df4fce4 commit 03701e1
2 files changed
Lines changed: 48 additions & 26 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| 60 | + | |
60 | 61 | | |
61 | 62 | | |
62 | 63 | | |
| 64 | + | |
63 | 65 | | |
64 | 66 | | |
65 | 67 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
98 | 115 | | |
99 | 116 | | |
100 | 117 | | |
| |||
116 | 133 | | |
117 | 134 | | |
118 | 135 | | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
119 | 141 | | |
120 | 142 | | |
121 | 143 | | |
| 144 | + | |
| 145 | + | |
122 | 146 | | |
123 | 147 | | |
124 | 148 | | |
125 | 149 | | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
126 | 155 | | |
127 | 156 | | |
128 | 157 | | |
| |||
137 | 166 | | |
138 | 167 | | |
139 | 168 | | |
140 | | - | |
| 169 | + | |
141 | 170 | | |
142 | 171 | | |
143 | 172 | | |
| |||
146 | 175 | | |
147 | 176 | | |
148 | 177 | | |
149 | | - | |
150 | 178 | | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
174 | 186 | | |
175 | | - | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
176 | 196 | | |
177 | 197 | | |
0 commit comments