-
Notifications
You must be signed in to change notification settings - Fork 233
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
Usage in close-to-real SSR environment? #605
Labels
Comments
mpeyper
added
bug
Something isn't working
good first issue
Good for newcomers
and removed
question
Further information is requested
labels
Apr 22, 2021
@mpeyper i'm not really into SSR render flow, but if solution is only about that -i'll do. |
4 tasks
mpeyper
pushed a commit
that referenced
this issue
Apr 22, 2021
* fix(ssr): div container created only during hydration It allows to run tests in real node environment, where no DOM global objects exists. Fix: #605 * chore: add xobotyi to hall of fame %)
🎉 This issue has been resolved in version 5.1.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
jsjoeio
pushed a commit
to jsjoeio/react-hooks-testing-library
that referenced
this issue
Feb 16, 2022
jsjoeio
pushed a commit
to jsjoeio/react-hooks-testing-library
that referenced
this issue
Feb 20, 2022
jsjoeio
pushed a commit
to jsjoeio/react-hooks-testing-library
that referenced
this issue
Feb 26, 2022
jsjoeio
added a commit
to jsjoeio/react-hooks-testing-library
that referenced
this issue
Feb 27, 2022
feat: add test to reproduce testing-library#605
4 tasks
koobawuah
added a commit
to koobawuah/react-hooks-testing-library
that referenced
this issue
Jun 16, 2022
koobawuah
added a commit
to koobawuah/react-hooks-testing-library
that referenced
this issue
Jun 16, 2022
koobawuah
added a commit
to koobawuah/react-hooks-testing-library
that referenced
this issue
Jun 16, 2022
feat: add test to re-produce testing-library#605
🎉 This issue has been resolved in version 8.0.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
lavaldi
added a commit
to lavaldi/react-hooks-testing-library
that referenced
this issue
Jun 18, 2022
NgoranA
added a commit
to NgoranA/react-hooks-testing-library
that referenced
this issue
Jun 19, 2022
josegarrera
added a commit
to josegarrera/react-hooks-testing-library
that referenced
this issue
Jun 20, 2022
josegarrera
added a commit
to josegarrera/react-hooks-testing-library
that referenced
this issue
Jun 21, 2022
d3mola
added a commit
to d3mola/react-hooks-testing-library
that referenced
this issue
Jun 28, 2022
SK02K1
added a commit
to SK02K1/react-hooks-testing-library
that referenced
this issue
Aug 10, 2022
jonaskinnvall
added a commit
to jonaskinnvall/react-hooks-testing-library
that referenced
this issue
Oct 31, 2022
jonaskinnvall
added a commit
to jonaskinnvall/react-hooks-testing-library
that referenced
this issue
Oct 31, 2022
jonaskinnvall
added a commit
to jonaskinnvall/react-hooks-testing-library
that referenced
this issue
Nov 6, 2022
jonaskinnvall
added a commit
to jonaskinnvall/react-hooks-testing-library
that referenced
this issue
Nov 6, 2022
feat: add test to reproduce testing-library#605
novicedev7291
added a commit
to novicedev7291/react-hooks-testing-library
that referenced
this issue
Nov 12, 2022
stephenkilbourn
added a commit
to stephenkilbourn/react-hooks-testing-library
that referenced
this issue
Nov 15, 2022
stephenkilbourn
added a commit
to stephenkilbourn/react-hooks-testing-library
that referenced
this issue
Nov 15, 2022
stephenkilbourn
added a commit
to stephenkilbourn/react-hooks-testing-library
that referenced
this issue
Nov 15, 2022
feat: add test to reproduce testing-library#605
jfet97
added a commit
to jfet97/react-hooks-testing-library
that referenced
this issue
Dec 26, 2022
jfet97
added a commit
to jfet97/react-hooks-testing-library
that referenced
this issue
Dec 26, 2022
jfet97
added a commit
to jfet97/react-hooks-testing-library
that referenced
this issue
Dec 26, 2022
jfet97
added a commit
to jfet97/react-hooks-testing-library
that referenced
this issue
Dec 26, 2022
feat: add test to reproduce testing-library#605
ryanyogan
added a commit
to ryanyogan/react-hooks-testing-library
that referenced
this issue
Jan 16, 2023
fprl
added a commit
to fprl/react-hooks-testing-library
that referenced
this issue
Feb 16, 2023
fprl
added a commit
to fprl/react-hooks-testing-library
that referenced
this issue
Feb 16, 2023
fprl
added a commit
to fprl/react-hooks-testing-library
that referenced
this issue
Feb 19, 2023
fprl
added a commit
to fprl/react-hooks-testing-library
that referenced
this issue
Feb 19, 2023
feat: add test to re**produce testing-library#605
electrostaticfleece
added a commit
to electrostaticfleece/react-hooks-testing-library
that referenced
this issue
May 29, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is there any way to test SSR functionality in environment close to real SSR?
I'm testing the hook that should fallback to noop during SSR, the hook declaration itself, as for now i'm checking SSR by testing
window
type:typeof window !== 'undefined'
. Like this:When testing with jest in it's common env (jsdom) window object is obviously exists and there is no way to test that everything will be fine in SSR, since i gaij browser version of a hook.
If to switch environment to
node
, ssr tests failing withIn this case renderHook improted from server:
import { renderHook } from '@testing-library/react-hooks/server';
The text was updated successfully, but these errors were encountered: