Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Stuff I googled while updating React-Redux to run tests against React Native
  • Double-checking whether window exists in React Native:
react native window global
  • Finding the giant "useLayoutEffect warnings" thread:
react uselayouteffect ssr
  • General research on how Jest works with React Native:
jest react-dom react-native
jest react-dom react-native react-library
jest react native
  • Figuring out if Jest can load platform-specific files like the bundler does:
jest react native ".native.js"
  • Checking how run different segments of our test suite with different settings:
jest different presets per file
  • Looking to see if any libs test against both RD and RN:
jest "react-dom" "react-native"
  • Trying to figure out the right syntax for the RN Jest preset:
jest Preset react-native is invalid
jest "Preset react-native is invalid"
jest preset react native
  • Trying to solve an error (ultimately caused by lack of transforms applied):
jest mockComponent.js Support for the experimental syntax 'classProperties' isn't currently enabled
  • Wondering if I could create a template string once and reuse it with different values:
es6 template literal delayed interpolation
  • Needed to convert some RD test components to RN, including some that used data-testid:
react native equivalents div li
react-native view dataset
react-native view dataset data attribute
"react native" view dataset data attribute
react-native view testid
  • Figuring out if there's any way to detect use of ReactDOMServer:
react check environment is ssr
react-dom server
reactdomserver environment ssr
  • Shawn Wang joked about renaming Redux Starter Kit to "Redux Advanced Kit Pro With Hooks", so I looked up the classic Microsoft self-parody video on mangling the iPod packaging:
microsoft ipod naming
  • Docs on act():
react async act
  • Wanting to print timestamps in console logging to verify ordering:
jest console output timestamps
  • Looking for a way to shut up the "updates done outside of act()" warning:
jest filter console output
jest mock console
react jest console warning ignore
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment