Skip to content
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

Move <Router> to main.tsx #1558

Closed
FrozenPandaz opened this issue Jul 4, 2019 · 1 comment
Closed

Move <Router> to main.tsx #1558

FrozenPandaz opened this issue Jul 4, 2019 · 1 comment
Assignees
Labels
community This is a good first issue for contributing outdated type: enhancement

Comments

@FrozenPandaz
Copy link
Collaborator

FrozenPandaz commented Jul 4, 2019

Expected Behavior

Unit Testing react applications with routing should be easy.

main.tsx should render <Router><App/></Router> so that app.spec.tsx can render <MemoryRouter><App /><MemoryRouter>

Current Behavior

Unit Testing react applications with routing is not easy with the current setup.

<Router> is added within <App> which means that calling render(<MemoryRouter><App/></MemoryRouter>) does not work properly.

Steps to Reproduce

Please provide detailed steps for reproducing the issue.

  1. npx create-nx-workspace@latest react-test --preset empty
  2. ng add @nrwl/react
  3. `ng g @nrwl/react:app my-app
@github-actions
Copy link

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
community This is a good first issue for contributing outdated type: enhancement
Projects
None yet
Development

No branches or pull requests

2 participants