chore: clean up RouteParams type test structure#9573
chore: clean up RouteParams type test structure#9573dac09 merged 2 commits intoredwoodjs:mainfrom mrazauskas:clean-up-type-test-structure
RouteParams type test structure#9573Conversation
| 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.
@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: https://github.com/redwoodjs/redwood/blob/b6457700abf209da0c23bfa8dc0fc3883f663dc2/packages/router/src/__typetests__/routeParamsTypes.test.ts#L67-L68
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.
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
RouteParamsutility type.