codeceptjs / codeceptjs/CodeceptJS

in BDD or Gherkin mode, the `After` is not synchronous where next scenario starts (while the `After` is still executing)

未關閉
#4,288 9 則留言 1 個 reaction 已指派 0 人 在 GitHub 檢視
stale
主要語言
JavaScript
星號
4.2k
分支
757
平均合併
2 天 9 小時
30 天內合併 PR
16

描述

#### What are you trying to achieve?
In BDD / Gherkin mode, [After](https://codecept.io/bdd/#after) to be synchronous so it run to completion before the next scenario starts

Scenario 1
After --- run completely before Scenario 2 start
Scenario 2

#### What do you get instead?
`After` is asynchronous so it might still running while the next scenario already starting
It seems that the `After` implementation is based on [event](https://github.com/codeceptjs/CodeceptJS/blob/3.x/lib/container.js#L320-L322) which is independent from the promise chain.

### Details

* CodeceptJS version: 3.5.13
* NodeJS Version: v18.19.0
* Operating System: macOS
* webdriverio 8.32.0

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。