Joe Previte

Results 462 comments of Joe Previte

> It's breaking the thoughts process chain, then it takes time to recover. Studies are carried on this topic. It irritates me to the point when I either subconsciously ignore...

> Not sure how Stretchly helps then It's been a huge help. I usually use the mini break as a way to remind me to change to standing. > when...

> That doesn't sound right. Can you tell us the configuration of your branch that was created by gh pr checkout and your push configuration? (You may anonymize branch/repository names.)...

Combining @BPreisner and @airjp73's solutions, I made a new template to save myself (and others) future time: https://github.com/jsjoeio/react-ts-vitest-template

> As such, I don’t see option 1 so much as a Band-Aid as ensuring the test environment matches the scenario you are wanting to test. Ah, happy to hear...

> I don’t mind if you want to use this issue for it Guess that's easier. I'll update the title and add some notes here.

## Problem `hydrate()` is assumed to be called in a client environment (it uses `document`). However, if you do so in a non-client environment, you get ` ReferenceError: document is...

Yes! As @vapurrmaid said, we were confused on which should be used. We're more than happy to raise a PR to update the docs!

> Another workaround [testing-library/jest-dom#427 (comment)](https://github.com/testing-library/jest-dom/issues/427#issuecomment-1110985202) I used this workaround with the `react-ts` template and made a new template to save myself (and others) future time: https://github.com/jsjoeio/react-ts-vitest-template

@adamaslan it should still work. For new projects, I've decided to not use globals and instead go with this approach: https://github.com/typescript-course/react-avatar-tutorial/blob/5173c2881d546b29949e2a5343da2bb7ff2cf7bd/setupTests.ts See full commit for vitest + testing-lib setup: https://github.com/typescript-course/react-avatar-tutorial/commit/5173c2881d546b29949e2a5343da2bb7ff2cf7bd