【问题标题】:Cypress testing error, webpack related. Not sure on where to start with this oneCypress 测试错误,与 webpack 相关。不知道从哪里开始
【发布时间】:2021-07-18 04:25:44
【问题描述】:

您好,当我尝试运行我创建的测试文件时出现此错误。默认测试运行良好。只有我创建的文件会导致此错误

import {cypress as cy} from "cypress"

describe('Testing form inputs', () => {
    beforeEach(() => {
        cy.visit('http://localhost:3000')
    })
  });

 
    describe('My First Test', () => {
      it('Does not do much!', () => {
        expect(true).to.equal(true);
      })
    });

      describe('My New Test' , function () {
        
        it('Visits index site', function (){
          cy.visit("index.html");
        })
      });

【问题讨论】:

    标签: javascript npm cypress


    【解决方案1】:

    尝试在没有import {cypress as cy} from "cypress" 的情况下再次运行

    【讨论】: