@diplodoc/cli-tests 5.43.2 → 5.43.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.
|
@@ -35,12 +35,6 @@ path: active/toc.yaml
|
|
|
35
35
|
`;
|
|
36
36
|
|
|
37
37
|
exports[`Cleanup empty directories with stage filtering > should cleanup directories that contain only presets.yaml when TOC is ignored by stage 5`] = `
|
|
38
|
-
"default:
|
|
39
|
-
empty_var: empty_value
|
|
40
|
-
"
|
|
41
|
-
`;
|
|
42
|
-
|
|
43
|
-
exports[`Cleanup empty directories with stage filtering > should cleanup directories that contain only presets.yaml when TOC is ignored by stage 6`] = `
|
|
44
38
|
"---
|
|
45
39
|
metadata:
|
|
46
40
|
- name: generator
|
|
@@ -54,13 +48,13 @@ This is the main page content.
|
|
|
54
48
|
Root variable: {{root_var}}"
|
|
55
49
|
`;
|
|
56
50
|
|
|
57
|
-
exports[`Cleanup empty directories with stage filtering > should cleanup directories that contain only presets.yaml when TOC is ignored by stage
|
|
51
|
+
exports[`Cleanup empty directories with stage filtering > should cleanup directories that contain only presets.yaml when TOC is ignored by stage 6`] = `
|
|
58
52
|
"default:
|
|
59
53
|
root_var: root_value
|
|
60
54
|
"
|
|
61
55
|
`;
|
|
62
56
|
|
|
63
|
-
exports[`Cleanup empty directories with stage filtering > should cleanup directories that contain only presets.yaml when TOC is ignored by stage
|
|
57
|
+
exports[`Cleanup empty directories with stage filtering > should cleanup directories that contain only presets.yaml when TOC is ignored by stage 7`] = `
|
|
64
58
|
"title: Test Documentation
|
|
65
59
|
href: index.md
|
|
66
60
|
items:
|
package/e2e/assets.spec.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import {describe, it} from 'vitest';
|
|
1
|
+
import {describe, expect, it} from 'vitest';
|
|
2
|
+
import fs from 'node:fs';
|
|
3
|
+
import {join} from 'node:path';
|
|
2
4
|
|
|
3
5
|
import {TestAdapter, compareDirectories, getTestPaths} from '../fixtures';
|
|
4
6
|
|
|
@@ -13,4 +15,17 @@ describe('Assets', () => {
|
|
|
13
15
|
});
|
|
14
16
|
await compareDirectories(outputPath);
|
|
15
17
|
});
|
|
18
|
+
|
|
19
|
+
it('Assets HTML', async () => {
|
|
20
|
+
const {inputPath, outputPath} = getTestPaths('mocks/assets');
|
|
21
|
+
|
|
22
|
+
await TestAdapter.testBuildPass(inputPath, outputPath, {
|
|
23
|
+
md2md: false,
|
|
24
|
+
md2html: true,
|
|
25
|
+
args: '-j2',
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
expect(fs.existsSync(join(outputPath, '_images/mountain.jpg'))).toBe(true);
|
|
29
|
+
expect(fs.existsSync(join(outputPath, '_images/versions.png'))).toBe(true);
|
|
30
|
+
});
|
|
16
31
|
});
|
|
@@ -22,8 +22,8 @@ describe('Cleanup empty directories with stage filtering', () => {
|
|
|
22
22
|
expect(existsSync(resolve(outputPath, 'active/presets.yaml'))).toBe(true);
|
|
23
23
|
expect(existsSync(resolve(outputPath, 'active/toc.yaml'))).toBe(true);
|
|
24
24
|
|
|
25
|
-
expect(existsSync(resolve(outputPath, 'empty-section'))).toBe(
|
|
26
|
-
expect(existsSync(resolve(outputPath, 'empty-section/presets.yaml'))).toBe(
|
|
25
|
+
expect(existsSync(resolve(outputPath, 'empty-section'))).toBe(false);
|
|
26
|
+
expect(existsSync(resolve(outputPath, 'empty-section/presets.yaml'))).toBe(false);
|
|
27
27
|
|
|
28
28
|
// Check that root files are present
|
|
29
29
|
expect(existsSync(resolve(outputPath, 'index.md'))).toBe(true);
|