我正在将SVG导入到我的组件中,并使用ReactComponent将它们作为组件导入。 import { ReactComponent as D1 } from '../../../assets/images/characteristics/D1.svg'; 当我运行jest/enzyme进行测试时,我得到一个错误:元素类型无效:需要一个字符串(对于内置组件)或一个类/函
当前行为Invariant Violation: Invariant Violation: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, o