我目前正在使用 TestCafe 进行一些 e2e 测试。我遇到了以下错误
1) - Error in Role initializer -
A JavaScript error occurred on "http://localhost:3000/".
Repeat test actions in the browser and check the console for errors.
If you see this error, it means that the tested website caused it. You can fix it or disable tracking JavaScript errors in TestCafe. To do the latter, enable the "--skip-js-errors" option.
If this error does not occur, please write a new issue at:
"https://github.com/DevExpress/testcafe/issues/new?template=bug-report.md".
JavaScript error details:
ResizeObserver loop limit exceeded
No stack trace available
一些研究表明这个ResizeObserver loop limit exceeded
问题是一个良性错误。
但是,它导致我的测试失败。有什么方法可以在不使用--skip-js-errors
标志的情况下忽略这个特定错误,因为我不想因为这个问题而忽略所有 JavaScript 错误