react-dom

How to get CSS style in snapshot with Jest

只谈情不闲聊 提交于 2020-06-27 10:35:34
问题 I have the following question, I don't know if its possible to get the result using Jest + snapshot feature. I have a React components and I'm using Jest to test it. I want the snapshot to include css style not className . Currently my snapshot is like: <div id="main" className="myClass"></div> I would like to have it like: <div id="main" style={Object {"float": "right"}}></div> My App its using webpack ( sass-loader ) for parsing scss , so over there there are no issues. It is possible to