You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We recently ran into an error that dealt with accessing navigator.language without ensuring we were in a client environment (the browser, or a place with access to a window). In light of this, we should add tests that ensure this doesn't happen again.
What needs to be done
Essentially, we just need to call every method and try to cause every edge case with the Window object disabled.
Sidenote:
This also makes me think that we might need to turn isClient into a function so that it can detect a change between server-side and client-side instead of it being a fixed value for testing purposes.
The text was updated successfully, but these errors were encountered:
andria-dev
changed the title
Write tests to make sure that no errors occur in server-side environment
Tests to make sure that no errors occur in server-side environment
May 1, 2020
andria-dev
changed the title
Tests to make sure that no errors occur in server-side environment
Tests/server-side environment
May 1, 2020
andria-dev
changed the title
Tests/server-side environment
Test: Server-side environment
May 13, 2020
We recently ran into an error that dealt with accessing
navigator.language
without ensuring we were in a client environment (the browser, or a place with access to a window). In light of this, we should add tests that ensure this doesn't happen again.What needs to be done
Essentially, we just need to call every method and try to cause every edge case with the
Window
object disabled.Sidenote:
This also makes me think that we might need to turn
isClient
into a function so that it can detect a change between server-side and client-side instead of it being a fixed value for testing purposes.The text was updated successfully, but these errors were encountered: