这句话是什么意思“赛普拉斯命令不返回他们的主题,他们让他们"?
我正在了解 Cypress.io,并在他们的官方网站上看到了这个声明 Cypress.io
I'm learning about Cypress.io and came across this statement in their official site Cypress.io
Cypress 命令不返回它们的主题,而是让它们."
"Cypress commands do not return their subjects, they yield them."
cypress.io 中命令中的yield"和return"有什么区别?
What is the difference between "yield" and "return" in commands in cypress.io?
推荐答案
我把yield 的意思是'付钱',而return = '付钱'.
I take yield to mean 'pay it forward', whereas return = 'pay it back'.
参见核心概念
赛普拉斯命令是异步的,并会排队等待稍后执行.在执行过程中,从一个命令到下一个命令会产生主题,并且在每个命令之间运行大量有用的赛普拉斯代码以确保一切正常.
Cypress commands are asynchronous and get queued for execution at a later time. During execution, subjects are yielded from one command to the next, and a lot of helpful Cypress code runs between each command to ensure everything is in order.
相关文章