Skip to content

Add initTestConfig helper for more succinct example tests#1249

Merged
brandur merged 1 commit into
masterfrom
brandur-init-test-config
May 11, 2026
Merged

Add initTestConfig helper for more succinct example tests#1249
brandur merged 1 commit into
masterfrom
brandur-init-test-config

Conversation

@brandur
Copy link
Copy Markdown
Contributor

@brandur brandur commented May 11, 2026

Here, add an initTestConfig helper for example tests that wraps up a
lot of the common testing logic in each. This leaves the example tests
more succinct, takes a lot of test-only code out of the equation to keep
the signal higher for readers, and makes broadly refactoring example
tests easier as changes may need to only be made in one place. This is
very similar to the change we already made in River Pro.

Here, add an `initTestConfig` helper for example tests that wraps up a
lot of the common testing logic in each. This leaves the example tests
more succinct, takes a lot of test-only code out of the equation to keep
the signal higher for readers, and makes broadly refactoring example
tests easier as changes may need to only be made in one place. This is
very similar to the change we already made in River Pro.
@brandur brandur force-pushed the brandur-init-test-config branch from e59fd26 to b076e40 Compare May 11, 2026 09:29
@brandur brandur requested a review from bgentry May 11, 2026 09:34
Copy link
Copy Markdown
Contributor

@bgentry bgentry left a comment

Choose a reason for hiding this comment

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

I was just thinking of how useful it would be to pull this change over while I was reviewing the Resumable Jobs PR. Thank you for doing so!

@brandur
Copy link
Copy Markdown
Contributor Author

brandur commented May 11, 2026

Awesome man. Thanks!

@brandur brandur merged commit 4a75e68 into master May 11, 2026
26 of 27 checks passed
@brandur brandur deleted the brandur-init-test-config branch May 11, 2026 17: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.

2 participants