Commit 0e0aed8
Job/jobbase unification test fixtures (#177)
* job: update test fixtures for JobBase's renamed generateResult/innerJobs
* job: guard onMessage against undefined userUuid from JobBase
JobBase.userUuid (and JobSerialized.userUuid) was widened from string
to string | undefined upstream in arena-core as a defensive
null-safety change. Add an early return in JobManager.onMessage() so
tsc can narrow userUuid to a definite string for the rest of the
method, instead of failing to type-check the Map lookup, the
WebSocketServer.notifyUser call, and the workers.delete() call inside
the setTimeout closure.
Fixes TS2345 errors reported against jobManager.ts:22,24,30. A job
update message always carries a userUuid in practice (every job is
created for a specific user), so this is a no-op guard rather than a
change in expected behavior.
* Bump @openforis/arena-core to published v2.1.2
Points at the real published JobBase unification (was verified locally
via yarn link during development; this replaces that local link with
the actual published package now that the arena-core PR has merged).
Re-verified against the published package: tsc clean, full test suite
16/16 suites, 67/67 tests passing.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>1 parent 048fe83 commit 0e0aed8
5 files changed
Lines changed: 11 additions & 11 deletions
Binary file not shown.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
22 | 24 | | |
23 | 25 | | |
24 | 26 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | | - | |
| 21 | + | |
23 | 22 | | |
24 | 23 | | |
25 | 24 | | |
| |||
31 | 30 | | |
32 | 31 | | |
33 | 32 | | |
34 | | - | |
35 | | - | |
36 | | - | |
| 33 | + | |
| 34 | + | |
37 | 35 | | |
38 | 36 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1217 | 1217 | | |
1218 | 1218 | | |
1219 | 1219 | | |
1220 | | - | |
1221 | | - | |
1222 | | - | |
| 1220 | + | |
| 1221 | + | |
| 1222 | + | |
1223 | 1223 | | |
1224 | 1224 | | |
1225 | 1225 | | |
| |||
1235 | 1235 | | |
1236 | 1236 | | |
1237 | 1237 | | |
1238 | | - | |
| 1238 | + | |
1239 | 1239 | | |
1240 | 1240 | | |
1241 | 1241 | | |
| |||
1247 | 1247 | | |
1248 | 1248 | | |
1249 | 1249 | | |
1250 | | - | |
| 1250 | + | |
1251 | 1251 | | |
1252 | 1252 | | |
1253 | 1253 | | |
| |||
0 commit comments