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

Avoid duplicating test code between e2e & canary #2054

Closed
spypsy opened this issue Sep 6, 2023 · 2 comments · Fixed by #2299
Closed

Avoid duplicating test code between e2e & canary #2054

spypsy opened this issue Sep 6, 2023 · 2 comments · Fixed by #2299
Assignees

Comments

@spypsy
Copy link
Member

spypsy commented Sep 6, 2023

We have a few tests that run the same path in both e2e & canary flows. We previously used test suites exported from the tested package itself but this is not a great solution, as it pollutes the actual code that's necessary to run the packages.
We should figure out a way to share the test code without exporting it from the packages

@spypsy spypsy added this to A3 Sep 6, 2023
@spypsy spypsy converted this from a draft issue Sep 6, 2023
@benesjan
Copy link
Contributor

benesjan commented Sep 8, 2023

One way to tackle this would be to have a separate package which would contain the test suites. That way we would not clutter the original package.

OTOH this is not ideal for tests like Aztec RPC Server because this breaks a norm a bit because the unit test would not longer be in the same package.

@spypsy
Copy link
Member Author

spypsy commented Sep 8, 2023

This is pretty much what I have in mind.
I think we should have dir just for tests that will replace end-to-end and then having this tests run on different levels of mocking. Most e2e tests currently could either be run against Sandbox or a plain RPC Server.
I see unit tests as a separate thing and they should be in the project's directory. They should be run just by yarn test and not require any extra setup

@spypsy spypsy added this to the 📢 Initial Public Sandbox Release milestone Sep 11, 2023
@spypsy spypsy moved this from Todo to In Progress in A3 Sep 14, 2023
@spypsy spypsy self-assigned this Sep 14, 2023
@spypsy spypsy moved this from In Progress to In Review in A3 Sep 15, 2023
spypsy added a commit that referenced this issue Sep 16, 2023
Fixes #2054 
Refactoring so that CLI & Browser e2e tests share code from `end-to-end`
@github-project-automation github-project-automation bot moved this from In Review to Done in A3 Sep 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants