Skip to content

Commit d613ec2

Browse files
committed
test(service-automation): the refused-flow pin reads getFlow's null answer
Claude-Session: https://claude.ai/code/session_01CiCTczDo7tGhafXjf61dUJ Co-authored-by: Claude <noreply@anthropic.com>
1 parent 48e8d11 commit d613ec2

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

‎packages/services/service-automation/src/builtin/decision-overlapping-edge-conditions.pin.test.ts‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ describe('decision edge branching — exclusive by default, inclusive by declara
302302
// ── 4. `mode` is judged at registration, with the spec's own sentence ──
303303

304304
describe('registration parses `DecisionConfigSchema` and refuses an invalid `mode`', () => {
305-
it('refuses `mode` beside a non-empty `conditions` list — either member — at config.mode, with the refinement sentence', () => {
305+
it('refuses `mode` beside a non-empty `conditions` list — either member — at config.mode, with the refinement sentence', async () => {
306306
for (const mode of ['inclusive', 'exclusive']) {
307307
const definition = gatewayFlow({
308308
a: '', b: '',
@@ -320,12 +320,12 @@ describe('decision edge branching — exclusive by default, inclusive by declara
320320
expect(message).toContain('Either delete `mode` and keep the list');
321321
expect(message).toContain('move the branches onto the out-edges');
322322
}
323-
// Refused means never armed.
324-
expect(engine.getFlow('gateway')).toBeUndefined();
323+
// Refused means never armed (`getFlow` answers `null` for a name it does not hold).
324+
expect(await engine.getFlow('gateway')).toBeNull();
325325
}
326326
});
327327

328-
it('refuses a `mode` outside the closed pair with the value prescription', () => {
328+
it('refuses a `mode` outside the closed pair with the value prescription', async () => {
329329
const definition = gatewayFlow({ ...OVERLAP, config: { mode: 'all' } });
330330
expect(() => engine.registerFlow('gateway', definition)).toThrow(MODE_NOT_A_MODE);
331331
try {
@@ -335,7 +335,7 @@ describe('decision edge branching — exclusive by default, inclusive by declara
335335
expect(message).toContain("`mode: 'all'` is not a decision mode");
336336
expect(message).toContain("at config.mode");
337337
}
338-
expect(engine.getFlow('gateway')).toBeUndefined();
338+
expect(await engine.getFlow('gateway')).toBeNull();
339339
});
340340

341341
it('refuses the same shape inside a loop body, naming the region', () => {

0 commit comments

Comments
 (0)