Cypress:commands.ts 下的导入行会导致错误

问题描述 投票:0回答:0

当我将导入添加到

commands.ts
时,我会通过运行测试得到错误。

命令.ts

import 'cypress-localstorage-commands';

/* eslint-disable */
declare namespace Cypress {
  interface Chainable<Subject = any> {
     commandA();
     commandB();
     commandC();
  }
}

错误:

找不到模块:错误:无法解析“cypress-localstorage-commands” 在'C:..

typescript testing automated-tests cypress
© www.soinside.com 2019 - 2024. All rights reserved.