Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove reliance on util.inspect in snapshot tests
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
- Loading branch information