-
Notifications
You must be signed in to change notification settings - Fork 1k
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
chore: clean up RouteParams
type test structure
#9573
chore: clean up RouteParams
type test structure
#9573
Conversation
context('Glob params in the middle', () => { | ||
test('Multiple Glob route params', () => { | ||
const middleGlob: RouteParams<'/repo/{folders...}/edit'> = { | ||
folders: 'src/lib/auth.js', | ||
} | ||
test('Glob params in the middle', () => { | ||
const middleGlob: RouteParams<'/repo/{folders...}/edit'> = { | ||
folders: 'src/lib/auth.js', | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dac09 We had a conversation about this in #9394 already. I took a better look, seems like this is just a copy paste mistake.
The "Multiple Glob route params" test is defined above:
redwood/packages/router/src/__typetests__/routeParamsTypes.test.ts
Lines 67 to 68 in b645770
test('Multiple Glob route params', () => { | |
const globRoutes: RouteParams<'/from/{fromDate...}/to/{toDate...}'> = { |
It tests multiple params indeed, but in the nested case only one param is tested. For me it looks that the nested "Multiple Glob route params" is redundant here. This test case is simply called "Glob params in the middle". Similar to "Starts with Glob route params" case above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah agreed, looks that way to me too :)
Thank you for the PR again!
Co-authored-by: Daniel Choudhury <dannychoudhury@gmail.com>
…nario-multiple-tests * 'main' of github.com:redwoodjs/redwood: (21 commits) fix(deps): update dependency @whatwg-node/server to v0.9.18 (#9602) fix(deps): update dependency @apollo/client to v3.8.8 (#9600) chore: update yarn.lock chore(deps): update dependency @playwright/test to v1.40.1 (#9599) chore(deps): update dependency @supabase/supabase-js to v2.39.0 (#9603) fix(deps): update dependency @clerk/clerk-sdk-node to v4.12.22 (#9601) chore(deps): update dependency @clerk/clerk-react to v4.28.1 (#9598) fix(deps): update storybook monorepo to v7.6.2 (#9597) RSC: Generate a route manifest (#9592) chore(private-set): Wrap profile page in <PrivateSet> instead of Private (#9575) add documentation on mocking useParams in component test (#9284) Update Typescript to 5.3.2 (#9589) RSC: Refactor build process (#9588) fix(crwa): clarify docs to avoid issues in yarn modern installs (#9579) fix: Prevent `rw graphiql setup` from breaking with encryptSession error (#9582) fix: Remove "god code" typos from auth READMEs (#9583) Experimental Dockerfile: Fix typo in setup command (#9577) fix(streaming-ssr): Fixes running the streaming server using rw serve (#9558) 9316/update mantine setup (#9388) chore: clean up `RouteParams` type test structure (#9573) ...
This PR removes redundant nesting in a test of the
RouteParams
utility type.