spacehub

surshar / claude-code

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

Built by Anthropic · github.com/anthropics

claude-code / mods / diff / tests / open-outcome / open-outcome-of.test.ts
27 lines · 856 BRaw
1import { describe, expect, test, tier } from 'claude-code/testing'
2
3import OpenOutcome from '../../hooks/open-outcome'
4import Fixtures from '../fixtures'
5
6tier('builtin')
7
8describe('open-outcome-of', () => {
9 test('a placed pane, and an engine that resolves nothing, are placed', () => {
10 expect(OpenOutcome.openOutcomeOf({ isPlaced: true })).toBe('placed')
11 expect(OpenOutcome.openOutcomeOf(undefined)).toBe('placed')
12 })
13
14 test('left waiting it is withdrawn, with a reason or none', () => {
15 expect(OpenOutcome.openOutcomeOf(Fixtures.LEFT_WAITING.value)).toBe(
16 'withdrawn',
17 )
18
19 expect(OpenOutcome.openOutcomeOf({ isPlaced: false })).toBe('withdrawn')
20 })
21
22 test('with nothing attached to draw it yet it is awaited', () => {
23 expect(OpenOutcome.openOutcomeOf(Fixtures.LEFT_UNSEEN.value)).toBe(
24 'awaited',
25 )
26 })
27})