用rappid面对same错误。我尝试了建议的解决方案,但仍然面临同样的错误。
● Test suite failed to run
TypeError: Cannot read properties of undefined (reading 'prototype')
12 | or from the Rappid archive as was distributed by client IO. See the LICENSE file.*/
13 | /* eslint-disable */
> 14 | import { dia, shapes, ui } from '@clientio/rappid';
| ^
15 |
16 | import { enableVirtualRendering } from './features/virtual-rendering';
17 | import { toolbarConfig } from './config/toolbar.config';
at ../../node_modules/@clientio/rappid/rappid.js:4070:32
at ../../node_modules/@clientio/rappid/rappid.js:4613:3
at ../../node_modules/@clientio/rappid/rappid.js:2:65
错误在rappid.js中的应用
有人能帮我一下吗。为了纠正这一点我错过了什么。
发布于 2022-05-23 08:39:04
Jest使用不支持某些SVG实现的jsdom。https://github.com/jsdom/jsdom/issues/918
在Jest中模拟缺少的方法是可能的。
下面的存储库包含带有JointJS的Jest模拟。这是一个反应项目,但类似的测试设置角应该也解决了这个问题,我认为。https://github.com/clientIO/rappid-tutorial-react/blob/main/src/setupTests.ts
https://stackoverflow.com/questions/71262897
复制相似问题