Commit 770749e
fix(gherkin): emit test.before/after with real current test (#5580)
Gherkin beforeEach/afterEach pass Mocha hook Context into setup/teardown,
but asyncWrapper read suite.ctx.currentTest (undefined on Context), so
event.test.before received a placeholder test (title "...", empty tags).
Also forward Mocha's done callback instead of no-op () => {}, so
event.test.before completes before scenario Background Before hooks run.
Co-authored-by: Daniil Krapiunitski <daniil.krapiunitski@emplifi.io>
Co-authored-by: Cursor <cursoragent@cursor.com>1 parent 080da45 commit 770749e
2 files changed
Lines changed: 7 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
199 | 199 | | |
200 | 200 | | |
201 | 201 | | |
202 | | - | |
| 202 | + | |
203 | 203 | | |
204 | 204 | | |
205 | 205 | | |
| |||
211 | 211 | | |
212 | 212 | | |
213 | 213 | | |
214 | | - | |
| 214 | + | |
215 | 215 | | |
216 | 216 | | |
217 | 217 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
46 | | - | |
47 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
48 | 48 | | |
49 | | - | |
50 | | - | |
51 | | - | |
| 49 | + | |
| 50 | + | |
52 | 51 | | |
53 | 52 | | |
54 | 53 | | |
| |||
0 commit comments