Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tests for prompt display based on flag input during init #672

Merged
merged 3 commits into from
Mar 13, 2023

Conversation

cartogram
Copy link
Contributor

@cartogram cartogram commented Mar 10, 2023

WHY are these changes introduced?

This adds more test coverage on displaying prompts in the CLI. We show specific prompts based on what the user passes in as flags, for example, if they pass --template we don't need to ask them what template they want. There were some issues around this recently, which turned out to be malformed user input, but as I was investigating these issues I starting writing tests that should have been here from the start.

WHAT is this pull request doing?

These are pretty repetitive so opted to use a describe.each that iterates over each potential flag. There is a test for when the prompt is displayed (value is omitted), and another to assert that no prompt is displayed (when we receive that flag/option).

HOW to test your changes?

Green CI.

Post-merge steps

Checklist

  • I've read the Contributing Guidelines
  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've added a changeset if this PR contains user-facing or noteworthy changes
  • I've added tests to cover my changes
  • I've added or updated the documentation

@cartogram cartogram marked this pull request as ready for review March 10, 2023 18:51
@github-actions

This comment has been minimized.

@cartogram cartogram requested a review from a team March 10, 2023 18:52
Copy link
Contributor

@frandiox frandiox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Matt!

@cartogram cartogram merged commit 09259cf into 2023-01 Mar 13, 2023
@cartogram cartogram deleted the @cartogram/test-init-prompts branch March 13, 2023 05:38
@github-actions github-actions bot mentioned this pull request Mar 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants