Unit testing of styled-components with SVG imports
问题 I am in the process of upgrading the dependencies of a React project. I upgraded styled-components from 1.4.4 to 2.5.0-1 . I didn't expect any breaking changes since I read that styled-components v2 is a drop-in replacement for v1. I don't see any breaking changes in the web app, but my test cases are broken. Consider the following, dumb and useless test. test('does something', () => { expect(true).toBe(true); }); As expected, the test works. However, as soon as I even try to import a styled