admin管理员组文章数量:1410724
Im trying to test my react app, created with (create-react-app) with cypress.
For some reason im getting this error:
As you can see it tries to get an element by ROOT_ID, ROOT_ID it's a const:
All i find to fix this it's an import on cypress/support/index.js
import "cypress-react-unit-test/support";
But as you can see here:
This repo has been moved to the official cypress and i can't find the equivalent import.
Here is my plugins/index.js:
const findWebpack = require('find-webpack')
const webpackPreprocessor = require('@cypress/webpack-preprocessor')
/**
* @type {Cypress.PluginConfig}
*/
module.exports = (on) => {
// find the Webpack config used by react-scripts
const webpackOptions = findWebpack.getWebpackOptions()
if (!webpackOptions) {
throw new Error('Could not find Webpack in this project
本文标签:
javascriptCypress Reactcannot find root element to mount the componentStack Overflow
版权声明:本文标题:javascript - Cypress React, cannot find root element to mount the component - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人,
转载请联系作者并注明出处:http://www.betaflare.com/web/1744762050a2623811.html,
本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论