Skip to content
New issue

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

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

Already on GitHub? # to your account

test(cli): Add unit tests for the add command #1292

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

K-Sato1995
Copy link
Contributor

Overview

  • Extracting the core function of the "add" command into its own function called runAdd.
  • Writing basic unit tests for this newly-created function(runAdd).

@vercel
Copy link

vercel bot commented Aug 20, 2023

@K-Sato1995 is attempting to deploy a commit to the shadcn-pro Team on Vercel.

A member of the Team first needs to authorize it.

process.cwd()
)
.option("-p, --path <path>", "the path to add the component to.")
.action(runAdd)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I didn't touch the core logic at all. Just extracted the core functionality to the runAdd and calling the func here

@K-Sato1995 K-Sato1995 changed the title cli: Add tests for the add command cli: Add unit tests for the add command Aug 20, 2023
@K-Sato1995 K-Sato1995 changed the title cli: Add unit tests for the add command test(cli): Add unit tests for the add command Aug 21, 2023
@shadcn
Copy link
Collaborator

shadcn commented Sep 19, 2023

Awesome. I'll probably do same for the other command. Let me label this and get back to it.

@K-Sato1995 K-Sato1995 force-pushed the add-test-for-add-command branch from f027744 to 9aacfa7 Compare September 20, 2023 05:54
@K-Sato1995
Copy link
Contributor Author

Awesome. I'll probably do same for the other command. Let me label this and get back to it.

@shadcn
Thanks! Resolved the merge conflicts!
Would love to work on the other commands too.

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants