0

当我运行测试时,我在 Windows 测试客户端中收到此错误

CypressError: cy.exec('npm run -s command') 失败,因为命令以非零代码退出。

通过 {failOnNonZeroExit: false} 忽略退出代码失败。

失败信息:代码:1

标准错误:C:\Users\Administrator.jenkins\workspace\cypress-execution\node_modules\ssh2\lib\client.js:146 throw new Error('Cannot parse privateKey: ' + privKeyInfo.message);

4

1 回答 1

0

try... catch用块包装你的代码

try {
   throw 'myException'; // your code goes here
}
catch (e) {
   console.log(e);
}
于 2020-04-23T08:06:41.737 回答