TestAnswer
A queued answer consumed by createTestPrompter.
The test prompter returns these values exactly as provided; it does not coerce them. The one exception mirrors the terminal prompter: a string answer to an input prompt is run through the prompt's validate function, and a failing answer is rejected as a cancellation (see createTestPrompter). The normal resolution pipeline performs any later type coercion, so tests can supply values in the same shapes real prompts would yield:
stringforinputandselectbooleanforconfirmstring[]formultiselectPROMPT_CANCELto simulate user cancellation
Because the type is intentionally unknown, tests may also inject malformed answers to exercise downstream validation and error reporting.
- Import:
@kjanat/dreamcli/testkit - Export kind: type
- Declared in:
src/core/prompt/index.ts - Source link:
src/core/prompt/index.ts:165
Signatures
ts
type TestAnswer = unknown;