Common bugs and solutions #130
Pelayo-Reguera
started this conversation in
General
Replies: 1 comment
-
Bug descriptionThere seems to be a bug with some unitary tests, it has to do with the crypto module that is located inside of the Place.tsx class file, this test impedes any react component on our application that has Place imported to be tested, as it always leads to this error. SolutionThanks to this post in Stackoverflow I have found a solution that seems to fix the tests that involve the use of crypto. Adding the following line at the beginning of this tests fix the problem:
UpdatePlacing the code in the tests set up ts file has the same effect as placing it on each test and is a quite better soultion. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
For some time we have been having this issue in which all of our functions are executed twice on our app, and we did not know why, for example when the maps are loaded, (there is a console log to show them), this was appearing on the browser console:
Meaning this functions where executed twice, in order to solved I have found the following post on StackOverflow shich seems to explain why this was happening: https://stackoverflow.com/questions/50819162/why-is-my-function-being-called-twice-in-react
If we check the React official documentation page: https://react.dev/reference/react/StrictMode we can check that:
So as a small conclusion we do not need to change this while we are in development, and I think we will not need to touch any of it when we deploy our application, because as it is said in the React documentation:
Post made by Guillermo Dylan Carvajal Aza @UO283069
Beta Was this translation helpful? Give feedback.
All reactions