Skip to content

Commit f577187

Browse files
authored
docs: fix INIT event description (#121)
* docs: fix INIT event description * docs: update INIT event description in ru article * chore: fix typo
1 parent 30f7211 commit f577187

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

docs/reference/testplane-events.mdx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -399,9 +399,11 @@ module.exports = (testplane, opts) => {
399399

400400
## INIT {#init}
401401

402-
**async | master**
402+
**async | master, worker**
403+
404+
The `INIT` event is triggered before the [run][run] or [readTests][read-tests] tasks are performed. The event handler can be asynchronous: in which case, the tasks will only start after the Promise returned by the event handler is resolved.
403405

404-
The `INIT` event is triggered before the [run][run] or [readTests][read-tests] tasks are performed. The event handler can be asynchronous: in which case, the tasks will only start after the Promise returned by the event handler is resolved. The event triggers only once, regardless of how many times the tasks are performed.
406+
This event is emitted once in master process and once in each worker.
405407

406408
### Subscribing to the event {#init_subscription}
407409

i18n/ru/docusaurus-plugin-content-docs/current/reference/testplane-events.mdx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -398,9 +398,11 @@ module.exports = (testplane, opts) => {
398398

399399
## INIT {#init}
400400

401-
**async | master**
401+
**async | master, worker**
402+
403+
Событие `INIT` триггерится перед тем, как будут выполнены задачи [run][run] или [readTests][read-tests]. Обработчик события может быть асинхронным: в таком случае задачи начнут выполняться только после того, как будет разрезолвлен _Promise_, возвращаемый обработчиком события.
402404

403-
Событие `INIT` триггерится перед тем, как будут выполнены задачи [run][run] или [readTests][read-tests]. Обработчик события может быть асинхронным: в таком случае задачи начнут выполняться только после того, как будет разрезолвлен _Promise_, возвращаемый обработчиком события. Событие триггерится только один раз, независимо от того, сколько раз будут выполнены задачи.
405+
Событие триггерится один раз в мастер-процессе и один раз в каждом воркере.
404406

405407
### Подписка на событие {#init_subscription}
406408

0 commit comments

Comments
 (0)