Skip to content

Commit 0db4b64

Browse files
committed
fix: improve error handling in createAgent tests by ensuring prompt value validation
1 parent 2016506 commit 0db4b64

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

tests/unit/AgentActionTest.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,12 @@ describe('createAgent', () => {
127127
displayName: 'Bot',
128128
isOptimisticPersonalDetail: true,
129129
});
130-
expect(promptRollback?.value).toMatchObject({
130+
const promptValue = promptRollback?.value as Record<string, unknown> | undefined;
131+
132+
expect(promptValue).toMatchObject({
131133
prompt: 'My prompt',
132134
pendingAction: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD,
133-
errors: expect.any(Object),
134135
});
136+
expect(promptValue?.errors).toBeTruthy();
135137
});
136138
});

0 commit comments

Comments
 (0)