Skip to content

Commit 06d8e9b

Browse files
committed
fix: fix typos
1 parent 84c0d79 commit 06d8e9b

File tree

2 files changed

+44
-21
lines changed

2 files changed

+44
-21
lines changed

docs/reference/testplane-events.mdx

+21-9
Original file line numberDiff line numberDiff line change
@@ -272,14 +272,26 @@ Or as follows: see the [example](#new_worker_process_usage) from the description
272272
The test runner has a `registerWorkers` method which registers the plugin code for parallel execution in the Testplane workers. The method takes the following parameters:
273273

274274
<table>
275-
<thead>
276-
<tr><td>**Parameter**</td><td>**Type**</td><td>**Description**</td></tr>
277-
</thead>
278-
<tbody>
279-
<tr><td>workerFilepath</td><td>String</td><td>Absolute path to the worker.</td></tr>
280-
<tr><td>exportedMethods</td><td>String[]</td><td>List of exported methods.</td></tr>
281-
282-
</tbody>
275+
<thead>
276+
<tr>
277+
<td>**Parameter**</td>
278+
<td>**Type**</td>
279+
<td>**Description**</td>
280+
</tr>
281+
</thead>
282+
<tbody>
283+
<tr>
284+
<td>workerFilepath</td>
285+
<td>String</td>
286+
<td>Absolute path to the worker.</td>
287+
</tr>
288+
<tr>
289+
<td>exportedMethods</td>
290+
<td>String[]</td>
291+
<td>List of exported methods.</td>
292+
</tr>
293+
294+
</tbody>
283295
</table>
284296

285297
It returns an object which contains asynchronous functions with names from exported methods.
@@ -427,7 +439,7 @@ const parseConfig = require('./config');
427439
module.exports = (testplane, opts) => {
428440
const pluginConfig = parseConfig(opts);
429441

430-
if (!pluginConfig.enabled</td></tr> testplane.isWorker()) {
442+
if (!pluginConfig.enabled || testplane.isWorker()) {
431443
// either the plugin is disabled, or we are in the worker context – exit
432444
return;
433445
}

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

+23-12
Original file line numberDiff line numberDiff line change
@@ -273,14 +273,25 @@ module.exports = (testplane, opts) => {
273273
У раннера тестов есть метод `registerWorkers`, который регистрирует код плагина для параллельного выполнения в воркерах testplane. Метод принимает следующие параметры:
274274

275275
<table>
276-
<thead>
277-
<tr><td>**Параметр**</td><td>**Тип**</td><td>**Описание**</td></tr>
278-
</thead>
279-
<tbody>
280-
<tr><td>workerFilepath</td><td>String</td><td>Абсолютный путь к воркеру.</td></tr>
281-
<tr><td>exportedMethods</td><td>String[]</td><td>Список экспортируемых методов.</td></tr>
282-
283-
</tbody>
276+
<thead>
277+
<tr>
278+
<td>>**Параметр**</td>
279+
<td>**Тип**</td>
280+
<td>**Описание**</td>
281+
</tr>
282+
</thead>
283+
<tbody>
284+
<tr>
285+
<td>>workerFilepath</td>
286+
<td>String</td>
287+
<td>Абсолютный путь к воркеру.</td>
288+
</tr>
289+
<tr>
290+
<td>>exportedMethods</td>
291+
<td>String[]</td>
292+
<td>Список экспортируемых методов.</td>
293+
</tr>
294+
</tbody>
284295
</table>
285296

286297
При этом возвращает объект, который содержит асинхронные функции с именами из экспортированных методов.
@@ -365,7 +376,7 @@ const parseConfig = require('./config');
365376
module.exports = (testplane, opts) => {
366377
const pluginConfig = parseConfig(opts);
367378

368-
if (!pluginConfig.enabled <tr><td>testplane.isWorker()) {
379+
if (!pluginConfig.enabled || testplane.isWorker()) {
369380
// или плагин отключен, или мы находимся в контексте воркера – уходим
370381
return;
371382
}
@@ -428,7 +439,7 @@ const parseConfig = require('./config');
428439
module.exports = (testplane, opts) => {
429440
const pluginConfig = parseConfig(opts);
430441

431-
if (!pluginConfig.enabled</td></tr> testplane.isWorker()) {
442+
if (!pluginConfig.enabled || testplane.isWorker()) {
432443
// или плагин отключен, или мы находимся в контексте воркера – уходим
433444
return;
434445
}
@@ -1501,7 +1512,7 @@ const parseConfig = require('./config');
15011512
module.exports = (testplane, opts) => {
15021513
const pluginConfig = parseConfig(opts);
15031514

1504-
if (!pluginConfig.enabled <tr><td>testplane.isWorker()) {
1515+
if (!pluginConfig.enabled || testplane.isWorker()) {
15051516
// или плагин отключен, или мы находимся в контексте воркера – уходим
15061517
return;
15071518
}
@@ -1520,7 +1531,7 @@ module.exports = (testplane, opts) => {
15201531
testplane.on(testplane.events.INIT, () => {
15211532
// dev-сервер может быть запущен как через указание опции --dev-server
15221533
// при запуске testplane, так и в настройках плагина
1523-
const devServer = program && program.devServer</td></tr> pluginConfig.devServer;
1534+
const devServer = (program && program.devServer) || pluginConfig.devServer;
15241535

15251536
if (!devServer) {
15261537
// если dev-сервер запускать не нужно – уходим

0 commit comments

Comments
 (0)