Skip to content

Refactor lazy tests #13383

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

Merged
merged 2 commits into from
Apr 8, 2025
Merged

Refactor lazy tests #13383

merged 2 commits into from
Apr 8, 2025

Conversation

markdalgleish
Copy link
Member

@markdalgleish markdalgleish commented Apr 8, 2025

With the introduction of granular route.lazy, the patterns used in the tests became a bit inconsistent, but later PRs started landing on better patterns. This PR cleans things up and uses more consistent naming and patterns across all tests. Most notably, we're now avoiding the word lazy in variable names unless it refers to a route.lazy function.

Copy link

changeset-bot bot commented Apr 8, 2025

⚠️ No Changeset found

Latest commit: 1f99c40

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@markdalgleish markdalgleish changed the title Refactor lazy test Refactor lazy tests Apr 8, 2025
Comment on lines -102 to -105
let { lazyStub: lazyJsonStub, lazyDeferred: lazyJsonDeferred } =
createLazyStub();
let { lazyStub: lazyTextStub, lazyDeferred: lazyTextDeferred } =
createLazyStub();
Copy link
Member Author

Choose a reason for hiding this comment

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

This sort of aliased destructuring became so common in these tests, I decided it's cleaner to make this function return an array instead.

@markdalgleish markdalgleish merged commit a87b796 into dev Apr 8, 2025
5 checks passed
@markdalgleish markdalgleish deleted the markdalgleish/refactor-lazy-test branch April 8, 2025 02:20
Copy link
Contributor

🤖 Hello there,

We just published version 7.5.1-pre.0 which includes this pull request. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

Copy link
Contributor

🤖 Hello there,

We just published version 7.5.1 which includes this pull request. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants