小编Cyp*_*Dog的帖子

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

当我将导入添加到 中时commands.ts,我通过运行测试得到错误。

命令.ts

import 'cypress-localstorage-commands';

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

错误:

找不到模块:错误:无法解析“C:...\cypress\support\commands\commands”中的“cypress-localstorage-commands”,解析“C:...\cypress”中的“cypress-localstorage-commands” \support\commands'
解析的请求是使用描述文件的模块: C:...\angular\package.json (相对路径:./cypress/support/commands) 字段“浏览器”不包含有效的别名配置

testing automated-tests typescript cypress

2
推荐指数
1
解决办法
1286
查看次数

标签 统计

automated-tests ×1

cypress ×1

testing ×1

typescript ×1