@@ -515,17 +515,16 @@ const LONG_LOG_EXPECTATION_CASES: LongLogExpectationCase[] = [
|
515 | 515 | const expectNotifyNoopEvents = ( |
516 | 516 | events: string[], |
517 | 517 | notifyOnExitEmptySuccess: boolean, |
| 518 | +sessionId: string, |
518 | 519 | label: string, |
519 | 520 | ) => { |
520 | 521 | if (!notifyOnExitEmptySuccess) { |
521 | 522 | expect(events, label).toStrictEqual([]); |
522 | 523 | return; |
523 | 524 | } |
524 | | -expect(events.length, label).toBeGreaterThan(0); |
525 | | -expect( |
526 | | -events.some((event) => event.includes(OUTPUT_EXEC_COMPLETED)), |
527 | | -label, |
528 | | -).toBe(true); |
| 525 | +expect(events, label).toStrictEqual([ |
| 526 | +`${OUTPUT_EXEC_COMPLETED} (${sessionId.slice(0, 8)}, code 0)`, |
| 527 | +]); |
529 | 528 | }; |
530 | 529 | const runDisallowedElevationCase = async ({ |
531 | 530 | defaultLevel, |
@@ -620,10 +619,10 @@ const runNotifyNoopCase = async ({ label, notifyOnExitEmptySuccess }: NotifyNoop
|
620 | 619 | notifyOnExitEmptySuccess ? { notifyOnExitEmptySuccess: true } : {}, |
621 | 620 | ); |
622 | 621 | |
623 | | -const { status } = await runBackgroundCommandToCompletion(tool, COMMAND_NOOP); |
| 622 | +const { sessionId, status } = await runBackgroundCommandToCompletion(tool, COMMAND_NOOP); |
624 | 623 | expect(status).toBe(PROCESS_STATUS_COMPLETED); |
625 | 624 | const events = peekSystemEvents(DEFAULT_NOTIFY_SESSION_KEY); |
626 | | -expectNotifyNoopEvents(events, notifyOnExitEmptySuccess, label); |
| 625 | +expectNotifyNoopEvents(events, notifyOnExitEmptySuccess, sessionId, label); |
627 | 626 | }; |
628 | 627 | |
629 | 628 | describe("tool descriptions", () => { |
|