@diplodoc/cli-tests 5.25.1 → 5.25.3

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.
@@ -33,7 +33,7 @@ exports[`Check bundles > bundles list is correct > filelist 1`] = `
33
33
  `;
34
34
 
35
35
  exports[`Check bundles > bundles list is correct 1`] = `
36
- "allowHTML: true
36
+ "allowHtml: true
37
37
 
38
38
  meta:
39
39
  rootPath: http://127.0.0.1:5000/
@@ -20,7 +20,7 @@ exports[`Neuro-expert > Neuro-expert > filelist 1`] = `
20
20
  `;
21
21
 
22
22
  exports[`Neuro-expert > Neuro-expert 1`] = `
23
- "allowHTML: true
23
+ "allowHtml: true
24
24
  langs: ['en','ru']
25
25
 
26
26
  neuroExpert:
@@ -9,7 +9,7 @@ exports[`Local search > internal > filelist 1`] = `
9
9
  `;
10
10
 
11
11
  exports[`Local search > internal 1`] = `
12
- "allowHTML: true
12
+ "allowHtml: true
13
13
  langs: ['en','ru']
14
14
 
15
15
  interface:
@@ -13,7 +13,7 @@ exports[`Skip html extension > correctly trims .html and index.html on monolingu
13
13
  `;
14
14
 
15
15
  exports[`Skip html extension > correctly trims .html and index.html on monolingual docs 1`] = `
16
- "allowHTML: true
16
+ "allowHtml: true
17
17
  "
18
18
  `;
19
19
 
@@ -179,7 +179,7 @@ exports[`Skip html extension > correctly trims .html and index.html on multiling
179
179
  `;
180
180
 
181
181
  exports[`Skip html extension > correctly trims .html and index.html on multilingual docs 1`] = `
182
- "allowHTML: true
182
+ "allowHtml: true
183
183
  langs: ['en','ru']
184
184
  "
185
185
  `;
@@ -0,0 +1,127 @@
1
+ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
2
+
3
+ exports[`Toc label > should pass TocLabel object through to toc output > filelist 1`] = `
4
+ "[
5
+ ".yfm",
6
+ "index.md",
7
+ "page1.md",
8
+ "toc.yaml"
9
+ ]"
10
+ `;
11
+
12
+ exports[`Toc label > should pass TocLabel object through to toc output > filelist 2`] = `
13
+ "[
14
+ ".yfm",
15
+ "index.html",
16
+ "page1.html",
17
+ "toc.js"
18
+ ]"
19
+ `;
20
+
21
+ exports[`Toc label > should pass TocLabel object through to toc output 1`] = `
22
+ "allowHtml: true
23
+ "
24
+ `;
25
+
26
+ exports[`Toc label > should pass TocLabel object through to toc output 2`] = `
27
+ "---
28
+ metadata:
29
+ - name: generator
30
+ content: Diplodoc Platform vDIPLODOC-VERSION
31
+ vcsPath: index.md
32
+ ---
33
+ # Toc Label Test
34
+
35
+ Content
36
+ "
37
+ `;
38
+
39
+ exports[`Toc label > should pass TocLabel object through to toc output 3`] = `
40
+ "---
41
+ metadata:
42
+ - name: generator
43
+ content: Diplodoc Platform vDIPLODOC-VERSION
44
+ vcsPath: page1.md
45
+ ---
46
+ # Page 1
47
+
48
+ Content
49
+ "
50
+ `;
51
+
52
+ exports[`Toc label > should pass TocLabel object through to toc output 4`] = `
53
+ "title: Toc Label Test
54
+ href: index.md
55
+ label:
56
+ title: Preview
57
+ description: This service is in preview
58
+ theme: info
59
+ items:
60
+ - name: Page 1
61
+ href: page1.md
62
+ path: toc.yaml
63
+ "
64
+ `;
65
+
66
+ exports[`Toc label > should pass TocLabel object through to toc output 5`] = `
67
+ "allowHtml: true
68
+ "
69
+ `;
70
+
71
+ exports[`Toc label > should pass TocLabel object through to toc output 6`] = `
72
+ "<!DOCTYPE html>
73
+ <html lang="ru" dir="ltr">
74
+ <head>
75
+ <meta charset="utf-8">
76
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
77
+ <base href="./" />
78
+ <title>Toc Label Test | Toc Label Test</title>
79
+ <meta name="generator" content="Diplodoc Platform vDIPLODOC-VERSION">
80
+ <style type="text/css">html, body {min-height:100vh; height:100vh;}</style>
81
+ </head>
82
+ <body class="g-root g-root_theme_light">
83
+ <div id="root"></div>
84
+ <script type="application/json" id="diplodoc-state">
85
+ {"data":{"leading":false,"html":"&lt;p&gt;Content&lt;/p&gt;/n","meta":{"metadata":[{"name":"generator","content":"Diplodoc Platform vDIPLODOC-VERSION"}],"vcsPath":"index.md"},"headings":[],"title":"Toc Label Test"},"router":{"pathname":"index","depth":1,"base":"./"},"lang":"ru","langs":["ru"],"viewerInterface":{"toc":true,"search":true,"feedback":true}}
86
+ </script>
87
+ <script type="application/javascript">
88
+ const data = document.querySelector('script#diplodoc-state');
89
+ window.__DATA__ = JSON.parse((function unescape(string) {
90
+ return string.replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&amp;/g, "&");
91
+ })(data.innerText));
92
+ window.STATIC_CONTENT = false;
93
+ </script>
94
+ <script type="application/javascript" defer src="toc.js"></script>
95
+ </body>
96
+ </html>"
97
+ `;
98
+
99
+ exports[`Toc label > should pass TocLabel object through to toc output 7`] = `
100
+ "<!DOCTYPE html>
101
+ <html lang="ru" dir="ltr">
102
+ <head>
103
+ <meta charset="utf-8">
104
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
105
+ <base href="./" />
106
+ <title>Page 1 | Toc Label Test</title>
107
+ <meta name="generator" content="Diplodoc Platform vDIPLODOC-VERSION">
108
+ <style type="text/css">html, body {min-height:100vh; height:100vh;}</style>
109
+ </head>
110
+ <body class="g-root g-root_theme_light">
111
+ <div id="root"></div>
112
+ <script type="application/json" id="diplodoc-state">
113
+ {"data":{"leading":false,"html":"&lt;p&gt;Content&lt;/p&gt;/n","meta":{"metadata":[{"name":"generator","content":"Diplodoc Platform vDIPLODOC-VERSION"}],"vcsPath":"page1.md"},"headings":[],"title":"Page 1"},"router":{"pathname":"page1","depth":1,"base":"./"},"lang":"ru","langs":["ru"],"viewerInterface":{"toc":true,"search":true,"feedback":true}}
114
+ </script>
115
+ <script type="application/javascript">
116
+ const data = document.querySelector('script#diplodoc-state');
117
+ window.__DATA__ = JSON.parse((function unescape(string) {
118
+ return string.replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&amp;/g, "&");
119
+ })(data.innerText));
120
+ window.STATIC_CONTENT = false;
121
+ </script>
122
+ <script type="application/javascript" defer src="toc.js"></script>
123
+ </body>
124
+ </html>"
125
+ `;
126
+
127
+ exports[`Toc label > should pass TocLabel object through to toc output 8`] = `"window.__DATA__.data.toc = {"title":"Toc Label Test","href":"index.html","label":{"title":"Preview","description":"This service is in preview","theme":"info"},"items":[{"name":"Page 1","href":"page1.html","id":"UUID"}],"path":"toc.yaml","id":"UUID"};"`;
@@ -12,7 +12,7 @@ exports[`Vars and conditions > Vars and conditions > filelist 1`] = `
12
12
  `;
13
13
 
14
14
  exports[`Vars and conditions > Vars and conditions 1`] = `
15
- "allowHTML: true
15
+ "allowHtml: true
16
16
  "
17
17
  `;
18
18
 
@@ -0,0 +1,23 @@
1
+ import {describe, it} from 'vitest';
2
+
3
+ import {TestAdapter, compareDirectories, getTestPaths} from '../fixtures';
4
+
5
+ describe('Toc label', () => {
6
+ it('should pass TocLabel object through to toc output', async () => {
7
+ const {inputPath, outputPath} = getTestPaths('mocks/toc-label');
8
+
9
+ await TestAdapter.testBuildPass(inputPath, outputPath, {
10
+ md2md: true,
11
+ md2html: false,
12
+ args: '-j2',
13
+ });
14
+ await TestAdapter.testBuildPass(outputPath, outputPath + '-html', {
15
+ md2md: false,
16
+ md2html: true,
17
+ args: '-j2',
18
+ });
19
+
20
+ await compareDirectories(outputPath);
21
+ await compareDirectories(outputPath + '-html');
22
+ });
23
+ });
@@ -26,7 +26,7 @@ class Build {
26
26
 
27
27
  run(input: string, output: string, args: string[], env?: Record<string, string>) {
28
28
  return this.runner.runYfmDocs(
29
- ['--input', input, '--output', output, '--quiet', '--allowHTML', ...args],
29
+ ['--input', input, '--output', output, '--quiet', '--allowHtml', ...args],
30
30
  env,
31
31
  );
32
32
  }
@@ -1 +1 @@
1
- allowHTML: true
1
+ allowHtml: true
@@ -1,4 +1,4 @@
1
- allowHTML: true
1
+ allowHtml: true
2
2
 
3
3
  meta:
4
4
  rootPath: http://127.0.0.1:5000/
@@ -1,4 +1,4 @@
1
- allowHTML: true
1
+ allowHtml: true
2
2
  langs: ['en','ru']
3
3
 
4
4
  neuroExpert:
@@ -1,4 +1,4 @@
1
- allowHTML: true
1
+ allowHtml: true
2
2
 
3
3
  pdf:
4
4
  enabled: true
@@ -1,4 +1,4 @@
1
- allowHTML: true
1
+ allowHtml: true
2
2
  langs: ['en','ru']
3
3
 
4
4
  interface:
@@ -1 +1 @@
1
- allowHTML: true
1
+ allowHtml: true
@@ -1,2 +1,2 @@
1
- allowHTML: true
1
+ allowHtml: true
2
2
  langs: ['en','ru']
@@ -0,0 +1 @@
1
+ allowHtml: true
@@ -0,0 +1,3 @@
1
+ # Toc Label Test
2
+
3
+ Content
@@ -0,0 +1,3 @@
1
+ # Page 1
2
+
3
+ Content
@@ -0,0 +1,10 @@
1
+ title: Toc Label Test
2
+ href: index.md
3
+ label:
4
+ title: Preview
5
+ description: This service is in preview
6
+ theme: info
7
+
8
+ items:
9
+ - name: Page 1
10
+ href: page1.md
@@ -1 +1 @@
1
- allowHTML: true
1
+ allowHtml: true
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@diplodoc/cli-tests",
3
- "version": "5.25.1",
3
+ "version": "5.25.3",
4
4
  "bin": {
5
5
  "diplodoc-cli-test": "bin.mjs"
6
6
  },