custom-react-scripts
custom-react-scripts copied to clipboard
Using identity-obj-proxy for snapshot testing with CSS Modules
The template that's generated from snapshot tests has the CSS classnames as unknown. After doing a little bit of research, it looks like the easiest way to solve this is by using identity-obj-proxy.
I'm curious on how others are solving this issue if using snapshot testing for components.
If this is the only solution, I can create a PR that adds the following:
"moduleNameMapper": {
"^.+\\.(css|scss)$": "identity-obj-proxy"
}
@kitze thoughts?
I have no idea @sunnyvempati. I just released a new version of custom-react-scripts, can you try if it works without adding any config?