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

write a basic unit test for the command line app #10

Open
warengonzaga opened this issue Oct 4, 2024 · 25 comments
Open

write a basic unit test for the command line app #10

warengonzaga opened this issue Oct 4, 2024 · 25 comments
Assignees
Labels
chore Project Housekeeping (Issue/PR) good first issue For First-time Contributors (Issue) hacktoberfest Hacktoberfest (Issue) help wanted Need Help (Issue/PR)

Comments

@warengonzaga
Copy link
Owner

Summary:

There's a basic test.js file in the root directory; however, it is not the actual test for the current version of the command-line app. We need a tailored unit test for the command-line app.

Goal:

Write a unit test specifically for the current version and feature of the command line app.

Let me know if you want to take this issue or have questions.

@warengonzaga warengonzaga added chore Project Housekeeping (Issue/PR) good first issue For First-time Contributors (Issue) hacktoberfest Hacktoberfest (Issue) help wanted Need Help (Issue/PR) labels Oct 4, 2024
@gitdevjin
Copy link

Hi, Waren. I would like to work on this, may I try this?

@Abhinav-Bansal751
Copy link
Contributor

hi sir,i would also like to try this.

@warengonzaga
Copy link
Owner Author

Hey @gitdevjin and @Abhinav-Bansal751 feel free to submit your PR.

@gitdevjin
Copy link

@warengonzaga Thanks! :)

@warengonzaga
Copy link
Owner Author

Let me know which one of you can take it @Abhinav-Bansal751 @gitdevjin? So I can assign this issue.

Repository owner deleted a comment from devactivity-app bot Oct 6, 2024
@gitdevjin
Copy link

@warengonzaga I'll take it

@warengonzaga
Copy link
Owner Author

@warengonzaga I'll take it

Done! ✨

@gitdevjin
Copy link

Hi Waren, I tried to install your tool using npm install -g magicc but I couldn't even run it. Maybe my Macbook's problem. I tried all the solutions that are available Online, but none of them worked for me. I also tried to install it locally following Contributing.md. But it didn't work either.
I am going to try to make it work. However, if I can't figure it out until tomorrow, I'll let you know; then probably you should assign others. Thanks!

@warengonzaga
Copy link
Owner Author

@gitdevjin Hey there. To install it locally, you must follow the following for your tests.

  1. yarn install
  2. yarn setup

Since you are using a MacBook, it should work as expected because it uses Linux commands.

I wouldn't recommend installing it using npm or yarn globally.

@warengonzaga
Copy link
Owner Author

Otherwise, you can use CodeSpaces and do the changes there.

@Abhinav-Bansal751
Copy link
Contributor

for those who are trying it in windows,and getting rm not recognized as internal or external command,try putting rmdir /s /q dist in clean script.This is for windows.now run npm run build,then npm run setup.Then u can use magicc command ig.I have Had got some peer dependency issues while doing npm install , and i resolved it with npm install --legacy-peer-deps.Hope it helps

@warengonzaga
Copy link
Owner Author

@Abhinav-Bansal751 might be a good addition to script in package.json file?

Then add yarn setup:windows command.

@Abhinav-Bansal751
Copy link
Contributor

Yes ,I have added "setup:windows":"rmdir /s /q dist && yarn build" in my latest commit to add context to git message PR. pls see to it.

@warengonzaga
Copy link
Owner Author

I think you replaced the code there; kindly take a look at my suggested changes.
#14 (comment)

@Abhinav-Bansal751

@warengonzaga
Copy link
Owner Author

for those who are trying it in windows,and getting rm not recognized as internal or external command,try putting rmdir /s /q dist in clean script.This is for windows.now run npm run build,then npm run setup.Then u can use magicc command ig.I have Had got some peer dependency issues while doing npm install , and i resolved it with npm install --legacy-peer-deps.Hope it helps

I fixed this already @Abhinav-Bansal751 the easiest way to fix this is to remove those dependencies and add it again so that we can get the latest version. 😊

Because of that, it breaks our automated way to publish the NPM package.

@warengonzaga
Copy link
Owner Author

@gitdevjin how's your setup? Are you able to make any progress here? Let us know, I'm always here to help.

@Abhinav-Bansal751
Copy link
Contributor

for those who are trying it in windows,and getting rm not recognized as internal or external command,try putting rmdir /s /q dist in clean script.This is for windows.now run npm run build,then npm run setup.Then u can use magicc command ig.I have Had got some peer dependency issues while doing npm install , and i resolved it with npm install --legacy-peer-deps.Hope it helps

I fixed this already @Abhinav-Bansal751 the easiest way to fix this is to remove those dependencies and add it again so that we can get the latest version. 😊

Because of that, it breaks our automated way to publish the NPM package.

ohk,i didnt know about that earlier.

@gitdevjin
Copy link

Hi @warengonzaga.
The application is now running; however, I'm encountering issues with the test suite. It seems that ava isn't recognizing the React syntax.

@warengonzaga
Copy link
Owner Author

We can remove Ava or XO there, as long as we can test if the CLI works properly.

@warengonzaga
Copy link
Owner Author

warengonzaga commented Oct 12, 2024

I'm not familiar with Ava and XO. It came with Ink when I generated the project. According to Copilot, Ava is used for running tests while Xo is used to lint the React. You can choose any other linting or test suite that suits our purpose. @gitdevjin

@warengonzaga
Copy link
Owner Author

@gitdevjin what's the progress here?

@warengonzaga
Copy link
Owner Author

@gitdevjin
Copy link

gitdevjin commented Oct 20, 2024

@warengonzaga I apologize for the delayed response; I was occupied with midterms. I appreciate your suggestion and will give it a try. If I encounter any issues, I’ll reach out for help. Thank you for your understanding!

@warengonzaga
Copy link
Owner Author

No worries, @gitdevjin, just checking if you're stuck. I'm here to help.

@gitdevjin
Copy link

@warengonzaga I tried working on the test configuration issue, but I couldn’t get it to work. I think it might be best to assign it to someone else. Sorry for the trouble.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Project Housekeeping (Issue/PR) good first issue For First-time Contributors (Issue) hacktoberfest Hacktoberfest (Issue) help wanted Need Help (Issue/PR)
Projects
None yet
Development

No branches or pull requests

3 participants