【发布时间】:2021-08-19 10:08:39
【问题描述】:
这是一个非常基本的问题,但是由于我从来没有做过前端开发人员,所以 js 和 ts 对我来说还是很陌生的。
我正在尝试将 Cucumber 功能添加到 Cypress 测试套件中。我已经安装了 cypress-cucumber-preprocessor 包,但是当我能找到的所有操作指南和信息都使用 js 作为示例时,我遇到了问题。
我应该把它放到 index.js 文件中:
const cucumber = require('cypress-cucumber-preprocessor').default
module.exports = (on, config) => {
on('file:preprocessor', cucumber())
}
由于测试套件有一个 index.ts 文件,这自然不能复制粘贴。如何将其转换为 .ts?
【问题讨论】:
标签: typescript cypress