Skip to content
Discussion options

You must be logged in to vote

Hi, the @inquirer/testing package scope right now really is to test custom prompts; not full fledge app.

That later part is just much more complex. You can for example think of React app tests where the community needed to reimplement the DOM in Javascript (jsdom, happy-dom, etc) to make it possible. Similarly, to reach what you're looking for at a high level, I think we'd need to create a synthetic terminal for integration testing purposes. There's been some discussions on #1529 about this, and you'll see there's a recommendation of a library (I didn't test it myself.)

If your app isn't overly complex, the simplest solution will be to rely on mocking the inquirer prompts.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@trymeouteh
Comment options

Answer selected by trymeouteh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants