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

feat: add basic integration tests #13

Merged
merged 21 commits into from
Sep 13, 2024
Merged

feat: add basic integration tests #13

merged 21 commits into from
Sep 13, 2024

Conversation

km1chno
Copy link
Contributor

@km1chno km1chno commented Jul 10, 2024

resolves #2

heavily inspired by https://github.com/roninoss/create-expo-stack/blob/main/cli/__tests__/cli-integration.test.ts

Test projects

  • rn-setup-ci-yarn-flat (normal repo, non-expo)
  • rn-setup-ci-npm-flat (normal repo, non-expo)
  • rn-setup-ci-yarn-monorepo (monorepo, generated using create-expo-app)
  • rn-setup-ci-npm-monorepo (monorepo, generated using create-expo-app)
  • rn-setup-ci-create-expo-stack (normal repo, generated using create-expo-stack)

No EAS Update tests

I created tests for all recipes except EAS Update, since we plan on doing more changes in EAS in the near future, we can add it once it stabilizes.

No interactive tests

I tried to add interactive tests, but it didn't work. TL;DR I guess clack has some abstraction over input events that make stuff like subprocess.stdin.write('\n') //to simulate enter programatically not working.

--non-interactive flag

I wanted to at least test action prompts in detox, so I added --non-interactive flag that skips the Press enter to continue... prompt. We should add full support for it and document it in the future.

What next

@km1chno km1chno self-assigned this Jul 10, 2024
tsconfig.json Show resolved Hide resolved
@km1chno km1chno linked an issue Jul 11, 2024 that may be closed by this pull request
@km1chno km1chno requested a review from maciekstosio July 11, 2024 08:41
Base automatically changed from feat-add-npm-support to main August 6, 2024 10:16
@km1chno km1chno changed the title feat: add basic integration tests [WIP] feat: add basic integration tests Aug 14, 2024
@km1chno km1chno changed the title [WIP] feat: add basic integration tests feat: add basic integration tests Aug 27, 2024
@km1chno km1chno marked this pull request as draft August 27, 2024 10:23
@km1chno km1chno force-pushed the feat-add-integration-tests branch from bf40327 to 647be31 Compare August 28, 2024 15:54
@km1chno km1chno force-pushed the feat-add-integration-tests branch from 04f34d1 to 2954c0a Compare August 29, 2024 14:09
@km1chno km1chno marked this pull request as ready for review August 29, 2024 14:18
maciekstosio
maciekstosio previously approved these changes Sep 9, 2024
@km1chno
Copy link
Contributor Author

km1chno commented Sep 9, 2024

I will merge it after #94 and after regenerating snapshots

@km1chno km1chno merged commit d35c96c into main Sep 13, 2024
4 checks passed
@km1chno km1chno deleted the feat-add-integration-tests branch September 13, 2024 08:28
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.

Figure out how to write integration tests
2 participants