Skip to content

Commit 9764782

Browse files
authored
Merge pull request #636 from gemini-testing/TESTPLANE-448.fix_jest_docs
docs(jest): clarify the correct path for different versions
2 parents 3036b22 + 79cfb7b commit 9764782

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

docs/en/html-reporter-jest.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,17 @@ In our case, there are no special differences, but for convenience, all the nece
99
To connect the reporter, just go to jest.config.specify in the js file:
1010
```
1111
const config = {
12-
reporters: [
13-
'html-reporter/build/jest.js ' // Connecting our reporter
14-
'default' // Built-in Jest reporter, can be removed
12+
reporters: [
13+
'html-reporter/jest', // Connecting our reporter
14+
'default' // Built-in Jest reporter, can be removed
1515
// You can also connect other reporters
1616
],
1717
};
1818
```
1919

20-
After such a setup, in order to receive the report, it is enough to simply run the tests.
20+
> If you are using jest@27 and below, then you need to use the path - `html-reporter/build/jest`
21+
22+
After such a setup, in order to receive the report, it is enough to simply run the tests.
2123
The command to run the tests in your project is stored in the package.json, most often it is:
2224

2325
```
@@ -53,8 +55,8 @@ To transfer the settings to the reporter, you will need to slightly change conte
5355
```
5456
const config = {
5557
reporters: [
56-
['html-reporter/build/jest.js', {
57-
path: 'reports/html-report', // Changing the path to the report folder
58+
['html-reporter/jest', {
59+
path: 'reports/html-report', // Changing the path to the report folder
5860
}]
5961
],
6062
};

docs/ru/html-reporter-jest.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,15 @@
1313
```
1414
const config = {
1515
reporters: [
16-
'html-reporter/build/jest.js' // Подключаем наш репортер
16+
'html-reporter/jest', // Подключаем наш репортер
1717
'default' // Встроенный репортер Jest, можно убрать
1818
// Можно также подключать и другие репортеры
1919
],
2020
};
2121
```
2222

23+
> Если вы используете jest@27 и ниже, то вам необходимо использовать путь - `html-reporter/build/jest`
24+
2325
После такой настройки, для того чтобы получить отчет достаточно просто выполнить тесты. Команда для выполнения тестов в вашем проекте хранится в package.json, чаще всего это:
2426

2527
```
@@ -53,12 +55,12 @@ serve html-report
5355
```
5456
const config = {
5557
reporters: [
56-
['html-reporter/build/jest.js', {
58+
['html-reporter/jest', {
5759
// Настройки репортера
5860
path: 'reports/html-report', // Изменим путь к папке с отчетом
5961
}]
6062
],
6163
};
6264
```
6365

64-
В примере выше, мы изменили путь к папке с отчетом на `reports/html-report`.
66+
В примере выше, мы изменили путь к папке с отчетом на `reports/html-report`.

0 commit comments

Comments
 (0)