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

[cli] Improve Tests #18

Open
danstepanov opened this issue Oct 3, 2023 · 1 comment
Open

[cli] Improve Tests #18

danstepanov opened this issue Oct 3, 2023 · 1 comment
Assignees
Labels
contribution improvement Lowers the barrier to entry for contribution

Comments

@danstepanov
Copy link
Owner

danstepanov commented Oct 3, 2023

Currently

  • Tests currently test the local files rather than the the build folder which means that the tests can pass while running npx create-expo-stack@latest can be broken.
  • Running tests is slow and/or trips up with bun
  • Tests do not have full coverage
  • Tests don't even pass locally

What this is

We need to be able to ensure that every single iteration of configurations and flags works as expected, at any point in time but particularly upon any change made to the cli.

The way to confirm that each iteration works is to ensure that:

  • Project set up succeeds, which is to say that
    • The appropriate cli json object is created
    • The appropriate command is generated to rerun the command, if desired by the user
    • Project initialization succeeds
    • Initializing git succeeds (flag)
    • Base assets are copied
    • Installation of dependencies succeeds with the specified package manager (flag)
    • Code formatting completes
  • All of the elements on each screen are present, laid out properly, with the proper styles applied (android & ios)
  • Navigating throughout the application should function as expected such that clicking on a button will lead you to the appropriate page and clicking some other button will return you to the previous page (android & ios)

Conditions

  • Tests should run on the build folder rather than the the local folder to prevent tests passing locally while breaking in production (eg npx create-expo-stack@latest)
  • If they are to be run locally, they can't take too long (more than 2 min is too much)
  • Tests should not run on commit
  • A PR pertaining to the cli should not be able to be merged without tests passing
  • Going through the CLI interactively, all iterations work
  • Going through non-interactive mode, all iterations work

What this is not

  • Tests for the landing page
  • Tests for the docs
@danstepanov danstepanov changed the title [FR] Improve Tests [cli][FR] Improve Tests Nov 6, 2023
@danstepanov danstepanov self-assigned this Nov 13, 2023
@danstepanov danstepanov added the contribution improvement Lowers the barrier to entry for contribution label Nov 13, 2023
@danstepanov danstepanov changed the title [cli][FR] Improve Tests [cli] Improve Tests Nov 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution improvement Lowers the barrier to entry for contribution
Projects
None yet
Development

No branches or pull requests

2 participants