我创建了一个 cypress “任务”来从 DB 获取数据,我不想在索引文件中存储 configDB 的凭据,并希望通过 cypress.json 传递它。Cypress.env 不起作用有解决方法吗?
const configDB = {
server: "xxx",
port: xxx,
domain: "US",
user: "username",
password: "password",
database: "database",
driver: "tedious",
options: {
enableArithAbort: true,
},
};
const sql = require("mssql");
Run Code Online (Sandbox Code Playgroud)