mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
8e943d8f5a
Summary: According to Node's documentation: https://nodejs.org/api/util.html#util_util_inspect_object_showhidden_depth_colors > The util.inspect() method returns a string representation of object that is intended for debugging. **The output of util.inspect may change at any time and should not be depended upon programmatically.** Therefore, this diff switches over our RN Codegen snapshot tests to use a `JSON.stringify` call, followed by a replace of `"` with `'`. This gets the job done without compromising readability. **Question:** Why do we not use `"`? A: Jest escapes all `"` in the snapshots, which makes reading the snapshots/using them in the console harder. Changelog: [Internal] Reviewed By: hramos Differential Revision: D24157056 fbshipit-source-id: 2f1aa2df28ac3ed4aa17bcdbcd23846ddbf804cf