Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

il-sairamg
Copy link
Contributor

Description:

  • Added router state testing implementation in component's init hook

  • Set up state handling for path, params, and query parameters

  • Configured URL hash-based query parameter parsing

  • Added state information display via JSON.stringify

  • Testing covers:

    • Router state data extraction and display
    • State object structure validation
    • Query parameters from router state
    • Path and params from router state

Copy link
Contributor

@michielvandergeest michielvandergeest left a comment

Choose a reason for hiding this comment

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

Thanks for this PR! A few comments:

  • I'm getting some linting errors, please don't forget to lint:fix before comitting
  • I get a warning about modifying the page prop, we shouldn't be overwriting props
  • I'm not sure about the part about queryParams. I don't think query or queryParams even exists on the route state object - why is this part there?

➡️ let's keep the example as simple and clear as possible and test only whether the correct information is available in the router state object in the init hook (in line with the recent change)

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