Repository navigation
Commit 94f0925
committed
fix(tests): write the specs against the surface main actually declares
Two adaptations, tests only, no production hunk moved:
- presentAssistantMessage-missing-native-args.spec.ts: the fixture set
presentAssistantMessageLocked / presentAssistantMessageHasPendingUpdates, which main
renamed to dispatchState / pendingWork (src/core/task/dispatchState.ts:1-7 defines the enum,
the PendingWork type and transitionDispatch); the double now sets dispatchState:
DispatchState.IDLE and pendingWork: null like main's own presentAssistantMessage specs.
- Task.spec.ts: two 'task.abort = true' assignments on a real new Task({...}) became
'void task.abortTask()'. Task.ts:3582 declares 'get abort(): boolean' over the run-state
latch and src/ carries no 'set abort(' declaration; Task.ts:3633 declares
'public abortTask(isAbandoned = false): Promise<void>', whose first statement is the
synchronous requestAbort(), so the latch is set at the same point in the stream and the
promise is the shared one rather than a floating call. Main's own Task.spec.ts carries 18
abortTask()/requestAbort( rows and assigns .abort only on doubles.1 parent c0fba32 commit 94f0925
2 files changed
Lines changed: 11 additions & 4 deletions
File tree
- src/core
- assistant-message/__tests__
- task/__tests__
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
53 | | - | |
54 | | - | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
55 | 58 | | |
56 | 59 | | |
57 | 60 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8043 | 8043 | | |
8044 | 8044 | | |
8045 | 8045 | | |
8046 | | - | |
| 8046 | + | |
| 8047 | + | |
| 8048 | + | |
8047 | 8049 | | |
8048 | 8050 | | |
8049 | 8051 | | |
| |||
8075 | 8077 | | |
8076 | 8078 | | |
8077 | 8079 | | |
8078 | | - | |
| 8080 | + | |
| 8081 | + | |
| 8082 | + | |
8079 | 8083 | | |
8080 | 8084 | | |
8081 | 8085 | | |
| |||
0 commit comments