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

js: DRY creation of a runner from archive in the tests #3935

Merged
merged 1 commit into from
Sep 10, 2024

Conversation

mstoykov
Copy link
Contributor

@mstoykov mstoykov commented Sep 6, 2024

What?

Refactor js tests so we do not repeat the same pattern to create a runner from an archive.

Why?

This was copy-pasted around and similar to how getSimpleRunner makes it hard to refactor if you add new fields that need to be around always.

We could also make a helper to create a runner + archive and run the provided test as function argument. But that would work in a lot less of the cases and isn't as necessary for #3917 to be a bit less noisy.

Checklist

  • I have performed a self-review of my code.
  • I have added tests for my changes.
  • I have run linter locally (make lint) and all checks pass.
  • I have run tests locally (make tests) and all tests pass.
  • I have commented on my code, particularly in hard-to-understand areas.

Related PR(s)/Issue(s)

This was copy-pasted around and similar to how getSimpleRunner makes it
hard to refactor if you add new fields that need to be around always.
@mstoykov mstoykov added this to the v0.54.0 milestone Sep 6, 2024
@mstoykov mstoykov requested a review from a team as a code owner September 6, 2024 13:32
@mstoykov mstoykov requested review from olegbespalov and joanlopez and removed request for a team September 6, 2024 13:32
Copy link
Contributor

@joanlopez joanlopez left a comment

Choose a reason for hiding this comment

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

Nice idea, thanks! 😄

@mstoykov mstoykov merged commit 39bddb2 into master Sep 10, 2024
23 checks passed
@mstoykov mstoykov deleted the jsRefactorRunnerFromArchive branch September 10, 2024 07:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants