mirror of
https://github.com/deepseek-ai/deepseek-harness.git
synced 2026-08-29 04:26:38 +00:00
test(subagent): use valid process outcomes
This commit is contained in:
@@ -1396,7 +1396,7 @@ describe('run publication, cancellation, and settlement', () => {
|
||||
queryMock.mockImplementationOnce(({ options }) => {
|
||||
factoryController = options.abortController
|
||||
options.spawnClaudeCodeProcess!(sdkSpawnOptions())
|
||||
spawned.settle({ exitCode: 17, signal: 'SIGABRT' })
|
||||
spawned.settle({ exitCode: 17, signal: null })
|
||||
throw new Error('query construction failed')
|
||||
})
|
||||
const factoryFailure = startClaudeCodeRun(request(), {
|
||||
@@ -1409,7 +1409,7 @@ describe('run publication, cancellation, and settlement', () => {
|
||||
await expect(factoryFailure).rejects.toThrow(expectedFailureDiagnostic(
|
||||
'query-start',
|
||||
'unknown',
|
||||
{ exitCode: 17, signal: 'SIGABRT' },
|
||||
{ exitCode: 17, signal: null },
|
||||
))
|
||||
await expect(factoryFailure).rejects.not.toThrow('query construction failed')
|
||||
expect(spawnSpecs).toHaveLength(1)
|
||||
|
||||
@@ -1708,7 +1708,7 @@ describe('run lifecycle and quiescence', () => {
|
||||
codexErrorInfo: 'other',
|
||||
}))
|
||||
child.fromChild.end()
|
||||
child.settle({ exitCode: 17, signal: 'SIGABRT' })
|
||||
child.settle({ exitCode: 17, signal: null })
|
||||
await expect(run.result).resolves.toEqual({
|
||||
output: [],
|
||||
diagnostic: expectedFailureDiagnostic('turn', 'other'),
|
||||
@@ -1725,7 +1725,7 @@ describe('run lifecycle and quiescence', () => {
|
||||
turnCompleted('completed'),
|
||||
)
|
||||
child.fromChild.end()
|
||||
child.settle({ exitCode: 17, signal: 'SIGABRT' })
|
||||
child.settle({ exitCode: 17, signal: null })
|
||||
await expect(run.result).resolves.toEqual({
|
||||
output: [{ type: 'text', text: 'answer' }],
|
||||
stopReason: 'completed',
|
||||
@@ -1967,11 +1967,11 @@ describe('run lifecycle and quiescence', () => {
|
||||
})
|
||||
await exitedThreadChild.peer.nextMethod('initialized')
|
||||
await exitedThreadChild.peer.nextMethod('thread/start')
|
||||
exitedThreadChild.settle({ exitCode: 17, signal: 'SIGABRT' })
|
||||
exitedThreadChild.settle({ exitCode: null, signal: 'SIGABRT' })
|
||||
await expect(exitedThreadStarting).rejects.toThrow(expectedFailureDiagnostic(
|
||||
'thread-start',
|
||||
'unknown',
|
||||
{ outcome: { exitCode: 17, signal: 'SIGABRT' } },
|
||||
{ outcome: { exitCode: null, signal: 'SIGABRT' } },
|
||||
))
|
||||
|
||||
const stderrChild = fakeChild()
|
||||
|
||||
Reference in New Issue
Block a user