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

Fix infinite loop when back button is pressed #125

Merged
merged 9 commits into from
Sep 23, 2021

Conversation

Janekdererste
Copy link
Collaborator

@Janekdererste Janekdererste commented Jul 19, 2021

fixes #116

This needs fixing of unit tests before it can be merged.

@Janekdererste Janekdererste changed the title Move parsing and creation of URL into NavBar component. Those things … Fix infinite loop when back button is pressed Jul 19, 2021
Janekdererste added 2 commits September 20, 2021 14:54
* Change jest config to use jsdom, so that window is available during testing
* Add Window module to make it possible to mock the window object during testing
@Janekdererste Janekdererste marked this pull request as ready for review September 20, 2021 12:57
@easbar
Copy link
Member

easbar commented Sep 22, 2021

There are lots of whitespace changes in package-lock.json. When I auto-format the file in IntelliJ most changes go away. Should we apply the formatting? And maybe we should update package-lock.json in master first (unrelated to this issue).

Try using @ notation for unti tests so that location of paths doesn't matter
@Janekdererste
Copy link
Collaborator Author

Hm, I added .json files to my prettier config in intellij. I didn't think about the package.lock file. Do you think I shoulld revert this?

@easbar
Copy link
Member

easbar commented Sep 22, 2021

Hm, I added .json files to my prettier config in intellij. I didn't think about the package.lock file. Do you think I shoulld revert this?

Ah ok so we have to prettier package.lock after creating it. This sounds good to me.

@easbar
Copy link
Member

easbar commented Sep 22, 2021

For some reason prettier --write "package-lock.json" does not change the file? Doing the same for package.json works!? In any case the file we commit should be consistent with the npm run format script (currently not including package-lock.json).

@easbar
Copy link
Member

easbar commented Sep 22, 2021

Ah package-lock.json is in .prettierignore...

@Janekdererste
Copy link
Collaborator Author

Alright, I took the package-lock.json from master to avoid all the unecessary formatting diff. I think we shold let the lock file be ignored by prettier. This way we can stick with the formatting of the genrated file.

@Janekdererste Janekdererste merged commit c1ae269 into master Sep 23, 2021
@Janekdererste Janekdererste deleted the 116_bug_back_button branch September 23, 2021 08:10
@easbar
Copy link
Member

easbar commented Sep 23, 2021

Ok thanks. But don't we have to update the package-lock file in master? I thought the build did not pass with the current one?!

@Janekdererste
Copy link
Collaborator Author

The build on master was passing. My freshly installed computer generated a new lock file when installing dependencies. I hope that this works like this now.

@karussell
Copy link
Member

Thanks a lot @Janekdererste !

ZeroGxMax pushed a commit to minhhpkp/graphhopper-maps that referenced this pull request Nov 12, 2024
* Move parsing and creation of URL into NavBar component. Those things are closely related anyway

* Create unit testing for NavBar.

* Change jest config to use jsdom, so that window is available during testing
* Add Window module to make it possible to mock the window object during testing

* Remove old test and remove parameter from navbar on creation

* trigger build

* Re-install stuff on local machine to trigger new lock file?

* Revert package-lock

* Include test folder in tsconfig
Try using @ notation for unti tests so that location of paths doesn't matter

* use package-lock.json from master, so that the formatting is not applied

Co-authored-by: Janekdererste <pewee-rescuer-delicacy-mum-pariah-thespian-weird-buzzy-dolby-tremor-shallow-spent-jag-geo-del>
Co-authored-by: easbar <[email protected]>
Co-authored-by: Peter <[email protected]>
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.

back button infinite loop
3 participants