赛普拉斯从CLI运行测试

时间:2019-08-27 12:28:41

标签: npm cypress

在赛普拉斯的CLI中运行代码时,我得到reference error

试图更新节点模块,但是没有运气

  

ReferenceError: passes is not defined at Spec.Base.epilogue (/Users/msgai/aistudio/node_modules/mocha/lib/reporters/base.js:324:31) at Object.onceWrapper (events.js:315:30) at emitOne (events.js:121:20) at Runner.emit (events.js:211:7) at Reporter.emit (/Users/keshavsharma/Library/Caches/Cypress/3.4.1/Cypress.app/Contents/Resources/app/packages/server/lib/reporter.js:237:55) at Object.server.startWebsockets.onMocha (/Users/keshavsharma/Library/Caches/Cypress/3.4.1/Cypress.app/Contents/Resources/app/packages/server/lib/project.js:300:22) at Socket.<anonymous> (/Users/keshavsharma/Library/Caches/Cypress/3.4.1/Cypress.app/Contents/Resources/app/packages/server/lib/socket.js:236:36) at emitTwo (events.js:126:13) at Socket.emit (events.js:214:7) at /Users/keshavsharma/Library/Caches/Cypress/3.4.1/Cypress.app/Contents/Resources/app/packages/socket/node_modules/socket.io/lib/socket.js:528:12 at _combinedTickCallback (internal/process/next_tick.js:131:7) at process._tickCallback (internal/process/next_tick.js:180:9)

     

ReferenceError: passes is not defined at Spec.Base.epilogue (/Users/msgai/aistudio/node_modules/mocha/lib/reporters/base.js:324:31) at Object.onceWrapper (events.js:315:30) at emitOne (events.js:121:20) at Runner.emit (events.js:211:7) at Reporter.emit (/Users/keshavsharma/Library/Caches/Cypress/3.4.1/Cypress.app/Contents/Resources/app/packages/server/lib/reporter.js:237:55) at Object.server.startWebsockets.onMocha (/Users/keshavsharma/Library/Caches/Cypress/3.4.1/Cypress.app/Contents/Resources/app/packages/server/lib/project.js:300:22) at Socket.<anonymous> (/Users/keshavsharma/Library/Caches/Cypress/3.4.1/Cypress.app/Contents/Resources/app/packages/server/lib/socket.js:236:36) at emitTwo (events.js:126:13) at Socket.emit (events.js:214:7) at /Users/keshavsharma/Library/Caches/Cypress/3.4.1/Cypress.app/Contents/Resources/app/packages/socket/node_modules/socket.io/lib/socket.js:528:12 at _combinedTickCallback (internal/process/next_tick.js:131:7) at process._tickCallback (internal/process/next_tick.js:180:9)

1 个答案:

答案 0 :(得分:0)

从您的问题来看,您似乎正在使用: 1.赛普拉斯3.4.1 2.摩卡版本(不清楚)

我建议: 1.尝试找到已安装的Mocha版本并升级到6(如果v <6): npm我摩卡 2.尝试查找已安装并安装的cypress-multi-reporters版本(如果尚未安装): npm i cypress-multi-reporters

让我知道它是否可以解决问题。