@diplodoc/cli-tests 0.0.0-rc-ci-optimization-test-202506191355 → 0.0.0-rc-toc-translation-202506261401

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,12 +6,12 @@ const generateMapTestTemplate = (
6
6
  testRootPath: string,
7
7
  args: TranslateRunArgs,
8
8
  ) => {
9
- test.skip(testTitle, async () => {
9
+ test(testTitle, async () => {
10
10
  const {inputPath, outputPath} = getTestPaths(testRootPath);
11
11
 
12
12
  await TestAdapter.testTranslatePass(inputPath, outputPath, args);
13
13
 
14
- await compareDirectories(outputPath, true);
14
+ await compareDirectories(outputPath);
15
15
  });
16
16
  };
17
17
 
@@ -43,7 +43,19 @@ describe('Translate command', () => {
43
43
  subcommand: 'extract',
44
44
  source: 'ru-RU',
45
45
  target: 'es-ES',
46
- additionalArgs: '--exclude ru/_no-translate/*.md',
46
+ additionalArgs: '--exclude ru/to-be-excluded.md',
47
+ },
48
+ );
49
+
50
+ const vars = {skip: 'prod'}
51
+ generateMapTestTemplate(
52
+ 'filter files on extract with extra vars option',
53
+ 'mocks/translation/dir-files',
54
+ {
55
+ subcommand: 'extract',
56
+ source: 'ru-RU',
57
+ target: 'es-ES',
58
+ additionalArgs: `--vars ${JSON.stringify(vars)}`,
47
59
  },
48
60
  );
49
61
 
@@ -0,0 +1,6 @@
1
+ translate:
2
+ extract:
3
+ vars:
4
+ test: prod
5
+ skip: dev
6
+
@@ -1,7 +1,5 @@
1
1
  ## Заголовок include
2
2
 
3
- [ссылка на файл не в toc.yaml](./aboba-not-in-toc.md)
4
-
5
- {% include [Описание](./_includes/test.md) %}
6
-
3
+ <!-- [ссылка на файл не в toc.yaml](./aboba-not-in-toc.md) -->
7
4
 
5
+ {% include [Описание](./_includes/test.md) %}
@@ -0,0 +1,3 @@
1
+ ## Included A1
2
+
3
+ TEST
@@ -0,0 +1,3 @@
1
+ ## Included A1
2
+
3
+ TEST
@@ -0,0 +1,3 @@
1
+ items:
2
+ - name: A1
3
+ href: a1.md
@@ -3,6 +3,7 @@ href: index.yaml
3
3
  items:
4
4
  - name: API Yandex Cloud
5
5
  href: index.yaml
6
+ - include: {mode: merge, path: folder1/toc-i.yaml}
6
7
  - name: Yandex Flavored Markdown
7
8
  href: index-yfm.md
8
9
  items:
@@ -0,0 +1,3 @@
1
+ ## No var page
2
+
3
+ This page might be translated or not. Depends on --strict-vars option.
@@ -0,0 +1 @@
1
+ ## Excluded title
@@ -4,4 +4,10 @@ items:
4
4
  - name: Aboba
5
5
  href: aboba.md
6
6
  - name: Не переводить
7
- href: _no-translate/exclude.md
7
+ when: skip == 'prod'
8
+ href: _no-translate/exclude.md
9
+ - name: Нет переменной в vars
10
+ when: novar == 'test'
11
+ href: no-var-page.md
12
+ - name: exclude-test
13
+ href: to-be-excluded.md
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@diplodoc/cli-tests",
3
- "version": "0.0.0-rc-ci-optimization-test-202506191355",
3
+ "version": "0.0.0-rc-toc-translation-202506261401",
4
4
  "bin": {
5
5
  "diplodoc-cli-test": "bin.mjs"
6
6
  },