Skip to content

TestAnswer

A queued answer consumed by createTestPrompter.

The test prompter returns these values exactly as provided; it does not coerce or validate them. The normal resolution pipeline performs any later type coercion, so tests can supply values in the same shapes real prompts would yield:

  • string for input and select
  • boolean for confirm
  • string[] for multiselect
  • PROMPT_CANCEL to simulate user cancellation

Because the type is intentionally unknown, tests may also inject malformed answers to exercise downstream validation and error reporting.

Signatures

ts
type TestAnswer = unknown;

See Also

Released under the MIT License.