@diplodoc/cli-tests 5.17.2 → 5.17.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.
- package/e2e/includes.test.ts +24 -0
- package/mocks/include-skip/test1/input/includes/missing.md +1 -0
- package/mocks/include-skip/test1/input/index.md +3 -0
- package/mocks/include-skip/test1/input/toc.yaml +3 -0
- package/mocks/include-skip/test2/input/includes/missing.md +1 -0
- package/mocks/include-skip/test2/input/includes/valid.md +4 -0
- package/mocks/include-skip/test2/input/index.md +4 -0
- package/mocks/include-skip/test2/input/toc.yaml +4 -0
- package/package.json +1 -1
package/e2e/includes.test.ts
CHANGED
|
@@ -35,4 +35,28 @@ describe('Includes', () => {
|
|
|
35
35
|
]);
|
|
36
36
|
expect(htmlReport.code).toBeGreaterThan(0);
|
|
37
37
|
});
|
|
38
|
+
|
|
39
|
+
test('Check filename and line in logs for skipped include', async () => {
|
|
40
|
+
const {inputPath, outputPath} = getTestPaths('mocks/include-skip/test1');
|
|
41
|
+
|
|
42
|
+
const mdReport = await TestAdapter.build.run(inputPath, outputPath, ['-f', 'html']);
|
|
43
|
+
expect(mdReport.code).toBeGreaterThan(0);
|
|
44
|
+
const mdLogs = mdReport.errors.join('\n');
|
|
45
|
+
|
|
46
|
+
expect(mdLogs).toContain(
|
|
47
|
+
'ERR Include skipped in (index.md:3). Include source for includes/missing.md not found',
|
|
48
|
+
);
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
test('Check filename and line in logs for skipped nested include', async () => {
|
|
52
|
+
const {inputPath, outputPath} = getTestPaths('mocks/include-skip/test2');
|
|
53
|
+
|
|
54
|
+
const mdReport = await TestAdapter.build.run(inputPath, outputPath, ['-f', 'html']);
|
|
55
|
+
expect(mdReport.code).toBeGreaterThan(0);
|
|
56
|
+
const mdLogs = mdReport.errors.join('\n');
|
|
57
|
+
|
|
58
|
+
expect(mdLogs).toContain(
|
|
59
|
+
'ERR Include skipped in (includes/valid.md:3). Include source for includes/missing.md not found',
|
|
60
|
+
);
|
|
61
|
+
});
|
|
38
62
|
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Skip
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Skip
|