@diplodoc/cli-tests 5.12.1 → 5.12.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/__snapshots__/alternates.test.ts.snap +2 -2
- package/e2e/__snapshots__/pdf-page.spec.ts.snap +137 -0
- package/e2e/__snapshots__/preprocess.test.ts.snap +279 -21
- package/e2e/__snapshots__/rtl.spec.ts.snap +4 -4
- package/e2e/alternates.test.ts +1 -0
- package/e2e/bundles.spec.ts +1 -0
- package/e2e/errors.spec.ts +18 -8
- package/e2e/generate-map.spec.ts +6 -2
- package/e2e/include-toc.test.ts +1 -0
- package/e2e/load-custom-resources.spec.ts +1 -0
- package/e2e/metadata.spec.ts +1 -0
- package/e2e/pdf-page.spec.ts +16 -0
- package/e2e/plugin-corner-cases.spec.ts +1 -0
- package/e2e/preprocess.test.ts +8 -5
- package/e2e/redirects-validation.spec.ts +5 -4
- package/e2e/regression.test.ts +1 -0
- package/e2e/restricted-access.test.ts +3 -5
- package/e2e/rtl.spec.ts +1 -0
- package/e2e/search.test.ts +1 -0
- package/e2e/single-page.spec.ts +1 -0
- package/e2e/skip-html-extension.spec.ts +1 -0
- package/e2e/translation.spec.ts +17 -6
- package/fixtures/cliAdapter.ts +7 -3
- package/fixtures/globals.d.ts +1 -1
- package/fixtures/runners/binary.ts +5 -2
- package/fixtures/runners/index.ts +2 -1
- package/fixtures/runners/source.ts +1 -1
- package/fixtures/utils/file.ts +20 -16
- package/fixtures/utils/test.ts +19 -19
- package/mocks/pdf-page/input/.yfm +7 -0
- package/mocks/pdf-page/input/index.md +6 -0
- package/mocks/pdf-page/input/page1.md +3 -0
- package/mocks/pdf-page/input/page2.md +5 -0
- package/mocks/pdf-page/input/page3.md +1 -0
- package/mocks/pdf-page/input/toc.yaml +15 -0
- package/mocks/preprocess/input/autotitle.md +3 -0
- package/mocks/preprocess/input/includes/level1.md +9 -0
- package/mocks/preprocess/input/includes/level11.md +1 -0
- package/mocks/preprocess/input/includes/sub/level2.md +7 -0
- package/mocks/preprocess/input/level0.md +7 -0
- package/mocks/preprocess/input/level1/level1.md +7 -0
- package/mocks/preprocess/input/level1/level2/level2.md +6 -0
- package/mocks/preprocess/input/level1/toc.yaml +5 -0
- package/mocks/preprocess/input/toc.yaml +8 -0
- package/package.json +1 -1
|
@@ -12,11 +12,16 @@ exports[`Preprocess > HashIncludes=true,Autotitles=false > filelist 1`] = `
|
|
|
12
12
|
"includes.md",
|
|
13
13
|
"includes/deep-hash.md",
|
|
14
14
|
"includes/deepWithIndent-hash.md",
|
|
15
|
+
"includes/level11.md",
|
|
15
16
|
"includes/sub/user-hash.md",
|
|
16
17
|
"includes/sub/userWithIndent-hash.md",
|
|
17
18
|
"includes/test-hash.md",
|
|
18
19
|
"includes/user-hash.md",
|
|
19
20
|
"latex.md",
|
|
21
|
+
"level0.md",
|
|
22
|
+
"level1/level1.md",
|
|
23
|
+
"level1/level2/level2.md",
|
|
24
|
+
"level1/toc.yaml",
|
|
20
25
|
"mermaid.md",
|
|
21
26
|
"sub/folder/item-1.md",
|
|
22
27
|
"toc.yaml"
|
|
@@ -105,6 +110,9 @@ Reference link with hash
|
|
|
105
110
|
[link]: ./mermaid.md
|
|
106
111
|
[link-with-hash]: ./1.md#subtitle
|
|
107
112
|
|
|
113
|
+
Link another level
|
|
114
|
+
[{#T}](./includes/level11.md)
|
|
115
|
+
|
|
108
116
|
## Header {#header}
|
|
109
117
|
|
|
110
118
|
Content
|
|
@@ -285,11 +293,22 @@ Link to mermaid diagram from 1 level
|
|
|
285
293
|
`;
|
|
286
294
|
|
|
287
295
|
exports[`Preprocess > HashIncludes=true,Autotitles=false 9`] = `
|
|
288
|
-
"
|
|
296
|
+
"---
|
|
297
|
+
metadata:
|
|
298
|
+
- name: generator
|
|
299
|
+
content: Diplodoc Platform vDIPLODOC-VERSION
|
|
300
|
+
vcsPath: includes/level11.md
|
|
301
|
+
---
|
|
302
|
+
# Level 11 svg header 
|
|
289
303
|
"
|
|
290
304
|
`;
|
|
291
305
|
|
|
292
306
|
exports[`Preprocess > HashIncludes=true,Autotitles=false 10`] = `
|
|
307
|
+
"Bob
|
|
308
|
+
"
|
|
309
|
+
`;
|
|
310
|
+
|
|
311
|
+
exports[`Preprocess > HashIncludes=true,Autotitles=false 11`] = `
|
|
293
312
|
"Link to mermaid diagram from 2 level
|
|
294
313
|
[](../../mermaid.md)
|
|
295
314
|
|
|
@@ -297,17 +316,17 @@ exports[`Preprocess > HashIncludes=true,Autotitles=false 10`] = `
|
|
|
297
316
|
Bob"
|
|
298
317
|
`;
|
|
299
318
|
|
|
300
|
-
exports[`Preprocess > HashIncludes=true,Autotitles=false
|
|
319
|
+
exports[`Preprocess > HashIncludes=true,Autotitles=false 12`] = `
|
|
301
320
|
"Test
|
|
302
321
|
"
|
|
303
322
|
`;
|
|
304
323
|
|
|
305
|
-
exports[`Preprocess > HashIncludes=true,Autotitles=false
|
|
324
|
+
exports[`Preprocess > HashIncludes=true,Autotitles=false 13`] = `
|
|
306
325
|
"Bob
|
|
307
326
|
"
|
|
308
327
|
`;
|
|
309
328
|
|
|
310
|
-
exports[`Preprocess > HashIncludes=true,Autotitles=false
|
|
329
|
+
exports[`Preprocess > HashIncludes=true,Autotitles=false 14`] = `
|
|
311
330
|
"---
|
|
312
331
|
metadata:
|
|
313
332
|
- name: generator
|
|
@@ -320,7 +339,66 @@ $/sqrt{3x-1}+(1+x)^2$
|
|
|
320
339
|
"
|
|
321
340
|
`;
|
|
322
341
|
|
|
323
|
-
exports[`Preprocess > HashIncludes=true,Autotitles=false
|
|
342
|
+
exports[`Preprocess > HashIncludes=true,Autotitles=false 15`] = `
|
|
343
|
+
"---
|
|
344
|
+
metadata:
|
|
345
|
+
- name: generator
|
|
346
|
+
content: Diplodoc Platform vDIPLODOC-VERSION
|
|
347
|
+
vcsPath: level0.md
|
|
348
|
+
---
|
|
349
|
+
# Level root svg header 
|
|
350
|
+
|
|
351
|
+
[{#T}](images.md)
|
|
352
|
+
|
|
353
|
+
[{#T}](level1/level1.md)
|
|
354
|
+
|
|
355
|
+
[{#T}](level1/level2/level2.md)
|
|
356
|
+
"
|
|
357
|
+
`;
|
|
358
|
+
|
|
359
|
+
exports[`Preprocess > HashIncludes=true,Autotitles=false 16`] = `
|
|
360
|
+
"---
|
|
361
|
+
metadata:
|
|
362
|
+
- name: generator
|
|
363
|
+
content: Diplodoc Platform vDIPLODOC-VERSION
|
|
364
|
+
vcsPath: level1/level1.md
|
|
365
|
+
---
|
|
366
|
+
# Level 1 svg header 
|
|
367
|
+
|
|
368
|
+
[{#T}](../level0.md)
|
|
369
|
+
|
|
370
|
+
[{#T}](level2/level2.md)
|
|
371
|
+
|
|
372
|
+
[{#T}](../includes/level11.md)"
|
|
373
|
+
`;
|
|
374
|
+
|
|
375
|
+
exports[`Preprocess > HashIncludes=true,Autotitles=false 17`] = `
|
|
376
|
+
"---
|
|
377
|
+
metadata:
|
|
378
|
+
- name: generator
|
|
379
|
+
content: Diplodoc Platform vDIPLODOC-VERSION
|
|
380
|
+
vcsPath: level1/level2/level2.md
|
|
381
|
+
---
|
|
382
|
+
# Level 2 svg header 
|
|
383
|
+
|
|
384
|
+
[{#T}](../level1.md)
|
|
385
|
+
|
|
386
|
+
[{#T}](../../level0.md)
|
|
387
|
+
|
|
388
|
+
"
|
|
389
|
+
`;
|
|
390
|
+
|
|
391
|
+
exports[`Preprocess > HashIncludes=true,Autotitles=false 18`] = `
|
|
392
|
+
"items:
|
|
393
|
+
- name: level1
|
|
394
|
+
href: level1.md
|
|
395
|
+
- name: level2
|
|
396
|
+
href: level2/level2.md
|
|
397
|
+
path: level1/toc.yaml
|
|
398
|
+
"
|
|
399
|
+
`;
|
|
400
|
+
|
|
401
|
+
exports[`Preprocess > HashIncludes=true,Autotitles=false 19`] = `
|
|
324
402
|
"---
|
|
325
403
|
metadata:
|
|
326
404
|
- name: generator
|
|
@@ -343,7 +421,7 @@ Some mermaid info
|
|
|
343
421
|
"
|
|
344
422
|
`;
|
|
345
423
|
|
|
346
|
-
exports[`Preprocess > HashIncludes=true,Autotitles=false
|
|
424
|
+
exports[`Preprocess > HashIncludes=true,Autotitles=false 20`] = `
|
|
347
425
|
"---
|
|
348
426
|
metadata:
|
|
349
427
|
- name: generator
|
|
@@ -360,7 +438,7 @@ Item 1 text
|
|
|
360
438
|
"
|
|
361
439
|
`;
|
|
362
440
|
|
|
363
|
-
exports[`Preprocess > HashIncludes=true,Autotitles=false
|
|
441
|
+
exports[`Preprocess > HashIncludes=true,Autotitles=false 21`] = `
|
|
364
442
|
"items:
|
|
365
443
|
- name: Md item with not_var syntax
|
|
366
444
|
href: 1.md
|
|
@@ -382,6 +460,14 @@ exports[`Preprocess > HashIncludes=true,Autotitles=false 16`] = `
|
|
|
382
460
|
href: autotitle.md
|
|
383
461
|
- name: includes
|
|
384
462
|
href: includes.md
|
|
463
|
+
- name: level11
|
|
464
|
+
href: includes/level11.md
|
|
465
|
+
- name: level0
|
|
466
|
+
href: level0.md
|
|
467
|
+
- name: level1
|
|
468
|
+
href: level1/level1.md
|
|
469
|
+
- name: level2
|
|
470
|
+
href: level1/level2/level2.md
|
|
385
471
|
path: toc.yaml
|
|
386
472
|
"
|
|
387
473
|
`;
|
|
@@ -398,11 +484,16 @@ exports[`Preprocess > HashIncludes=true,Autotitles=true > filelist 1`] = `
|
|
|
398
484
|
"includes.md",
|
|
399
485
|
"includes/deep-hash.md",
|
|
400
486
|
"includes/deepWithIndent-hash.md",
|
|
487
|
+
"includes/level11.md",
|
|
401
488
|
"includes/sub/user-hash.md",
|
|
402
489
|
"includes/sub/userWithIndent-hash.md",
|
|
403
490
|
"includes/test-hash.md",
|
|
404
491
|
"includes/user-hash.md",
|
|
405
492
|
"latex.md",
|
|
493
|
+
"level0.md",
|
|
494
|
+
"level1/level1.md",
|
|
495
|
+
"level1/level2/level2.md",
|
|
496
|
+
"level1/toc.yaml",
|
|
406
497
|
"mermaid.md",
|
|
407
498
|
"sub/folder/item-1.md",
|
|
408
499
|
"toc.yaml"
|
|
@@ -491,6 +582,9 @@ Reference link with hash
|
|
|
491
582
|
[link]: ./mermaid.md
|
|
492
583
|
[link-with-hash]: ./1.md#subtitle
|
|
493
584
|
|
|
585
|
+
Link another level
|
|
586
|
+
[Level 11 svg header ](./includes/level11.md)
|
|
587
|
+
|
|
494
588
|
## Header {#header}
|
|
495
589
|
|
|
496
590
|
Content
|
|
@@ -671,11 +765,22 @@ Link to mermaid diagram from 1 level
|
|
|
671
765
|
`;
|
|
672
766
|
|
|
673
767
|
exports[`Preprocess > HashIncludes=true,Autotitles=true 9`] = `
|
|
674
|
-
"
|
|
768
|
+
"---
|
|
769
|
+
metadata:
|
|
770
|
+
- name: generator
|
|
771
|
+
content: Diplodoc Platform vDIPLODOC-VERSION
|
|
772
|
+
vcsPath: includes/level11.md
|
|
773
|
+
---
|
|
774
|
+
# Level 11 svg header 
|
|
675
775
|
"
|
|
676
776
|
`;
|
|
677
777
|
|
|
678
778
|
exports[`Preprocess > HashIncludes=true,Autotitles=true 10`] = `
|
|
779
|
+
"Bob
|
|
780
|
+
"
|
|
781
|
+
`;
|
|
782
|
+
|
|
783
|
+
exports[`Preprocess > HashIncludes=true,Autotitles=true 11`] = `
|
|
679
784
|
"Link to mermaid diagram from 2 level
|
|
680
785
|
[Mermaid usage](../../mermaid.md)
|
|
681
786
|
|
|
@@ -683,17 +788,17 @@ exports[`Preprocess > HashIncludes=true,Autotitles=true 10`] = `
|
|
|
683
788
|
Bob"
|
|
684
789
|
`;
|
|
685
790
|
|
|
686
|
-
exports[`Preprocess > HashIncludes=true,Autotitles=true
|
|
791
|
+
exports[`Preprocess > HashIncludes=true,Autotitles=true 12`] = `
|
|
687
792
|
"Test
|
|
688
793
|
"
|
|
689
794
|
`;
|
|
690
795
|
|
|
691
|
-
exports[`Preprocess > HashIncludes=true,Autotitles=true
|
|
796
|
+
exports[`Preprocess > HashIncludes=true,Autotitles=true 13`] = `
|
|
692
797
|
"Bob
|
|
693
798
|
"
|
|
694
799
|
`;
|
|
695
800
|
|
|
696
|
-
exports[`Preprocess > HashIncludes=true,Autotitles=true
|
|
801
|
+
exports[`Preprocess > HashIncludes=true,Autotitles=true 14`] = `
|
|
697
802
|
"---
|
|
698
803
|
metadata:
|
|
699
804
|
- name: generator
|
|
@@ -706,7 +811,66 @@ $/sqrt{3x-1}+(1+x)^2$
|
|
|
706
811
|
"
|
|
707
812
|
`;
|
|
708
813
|
|
|
709
|
-
exports[`Preprocess > HashIncludes=true,Autotitles=true
|
|
814
|
+
exports[`Preprocess > HashIncludes=true,Autotitles=true 15`] = `
|
|
815
|
+
"---
|
|
816
|
+
metadata:
|
|
817
|
+
- name: generator
|
|
818
|
+
content: Diplodoc Platform vDIPLODOC-VERSION
|
|
819
|
+
vcsPath: level0.md
|
|
820
|
+
---
|
|
821
|
+
# Level root svg header 
|
|
822
|
+
|
|
823
|
+
[Images ](images.md)
|
|
824
|
+
|
|
825
|
+
[Level 1 svg header ](level1/level1.md)
|
|
826
|
+
|
|
827
|
+
[Level 2 svg header ](level1/level2/level2.md)
|
|
828
|
+
"
|
|
829
|
+
`;
|
|
830
|
+
|
|
831
|
+
exports[`Preprocess > HashIncludes=true,Autotitles=true 16`] = `
|
|
832
|
+
"---
|
|
833
|
+
metadata:
|
|
834
|
+
- name: generator
|
|
835
|
+
content: Diplodoc Platform vDIPLODOC-VERSION
|
|
836
|
+
vcsPath: level1/level1.md
|
|
837
|
+
---
|
|
838
|
+
# Level 1 svg header 
|
|
839
|
+
|
|
840
|
+
[Level root svg header ](../level0.md)
|
|
841
|
+
|
|
842
|
+
[Level 2 svg header ](level2/level2.md)
|
|
843
|
+
|
|
844
|
+
[Level 11 svg header ](../includes/level11.md)"
|
|
845
|
+
`;
|
|
846
|
+
|
|
847
|
+
exports[`Preprocess > HashIncludes=true,Autotitles=true 17`] = `
|
|
848
|
+
"---
|
|
849
|
+
metadata:
|
|
850
|
+
- name: generator
|
|
851
|
+
content: Diplodoc Platform vDIPLODOC-VERSION
|
|
852
|
+
vcsPath: level1/level2/level2.md
|
|
853
|
+
---
|
|
854
|
+
# Level 2 svg header 
|
|
855
|
+
|
|
856
|
+
[Level 1 svg header ](../level1.md)
|
|
857
|
+
|
|
858
|
+
[Level root svg header ](../../level0.md)
|
|
859
|
+
|
|
860
|
+
"
|
|
861
|
+
`;
|
|
862
|
+
|
|
863
|
+
exports[`Preprocess > HashIncludes=true,Autotitles=true 18`] = `
|
|
864
|
+
"items:
|
|
865
|
+
- name: level1
|
|
866
|
+
href: level1.md
|
|
867
|
+
- name: level2
|
|
868
|
+
href: level2/level2.md
|
|
869
|
+
path: level1/toc.yaml
|
|
870
|
+
"
|
|
871
|
+
`;
|
|
872
|
+
|
|
873
|
+
exports[`Preprocess > HashIncludes=true,Autotitles=true 19`] = `
|
|
710
874
|
"---
|
|
711
875
|
metadata:
|
|
712
876
|
- name: generator
|
|
@@ -729,7 +893,7 @@ Some mermaid info
|
|
|
729
893
|
"
|
|
730
894
|
`;
|
|
731
895
|
|
|
732
|
-
exports[`Preprocess > HashIncludes=true,Autotitles=true
|
|
896
|
+
exports[`Preprocess > HashIncludes=true,Autotitles=true 20`] = `
|
|
733
897
|
"---
|
|
734
898
|
metadata:
|
|
735
899
|
- name: generator
|
|
@@ -746,7 +910,7 @@ Item 1 text
|
|
|
746
910
|
"
|
|
747
911
|
`;
|
|
748
912
|
|
|
749
|
-
exports[`Preprocess > HashIncludes=true,Autotitles=true
|
|
913
|
+
exports[`Preprocess > HashIncludes=true,Autotitles=true 21`] = `
|
|
750
914
|
"items:
|
|
751
915
|
- name: Md item with not_var syntax
|
|
752
916
|
href: 1.md
|
|
@@ -768,6 +932,14 @@ exports[`Preprocess > HashIncludes=true,Autotitles=true 16`] = `
|
|
|
768
932
|
href: autotitle.md
|
|
769
933
|
- name: includes
|
|
770
934
|
href: includes.md
|
|
935
|
+
- name: level11
|
|
936
|
+
href: includes/level11.md
|
|
937
|
+
- name: level0
|
|
938
|
+
href: level0.md
|
|
939
|
+
- name: level1
|
|
940
|
+
href: level1/level1.md
|
|
941
|
+
- name: level2
|
|
942
|
+
href: level1/level2/level2.md
|
|
771
943
|
path: toc.yaml
|
|
772
944
|
"
|
|
773
945
|
`;
|
|
@@ -784,11 +956,16 @@ exports[`Preprocess > HashIncludes=true,Autotitles=true,Svg=true > filelist 1`]
|
|
|
784
956
|
"includes.md",
|
|
785
957
|
"includes/deep-hash.md",
|
|
786
958
|
"includes/deepWithIndent-hash.md",
|
|
959
|
+
"includes/level11.md",
|
|
787
960
|
"includes/sub/user-hash.md",
|
|
788
961
|
"includes/sub/userWithIndent-hash.md",
|
|
789
962
|
"includes/test-hash.md",
|
|
790
963
|
"includes/user-hash.md",
|
|
791
964
|
"latex.md",
|
|
965
|
+
"level0.md",
|
|
966
|
+
"level1/level1.md",
|
|
967
|
+
"level1/level2/level2.md",
|
|
968
|
+
"level1/toc.yaml",
|
|
792
969
|
"mermaid.md",
|
|
793
970
|
"sub/folder/item-1.md",
|
|
794
971
|
"toc.yaml"
|
|
@@ -877,6 +1054,9 @@ Reference link with hash
|
|
|
877
1054
|
[link]: ./mermaid.md
|
|
878
1055
|
[link-with-hash]: ./1.md#subtitle
|
|
879
1056
|
|
|
1057
|
+
Link another level
|
|
1058
|
+
[Level 11 svg header ](./includes/level11.md)
|
|
1059
|
+
|
|
880
1060
|
## Header {#header}
|
|
881
1061
|
|
|
882
1062
|
Content
|
|
@@ -1057,11 +1237,22 @@ Link to mermaid diagram from 1 level
|
|
|
1057
1237
|
`;
|
|
1058
1238
|
|
|
1059
1239
|
exports[`Preprocess > HashIncludes=true,Autotitles=true,Svg=true 9`] = `
|
|
1060
|
-
"
|
|
1240
|
+
"---
|
|
1241
|
+
metadata:
|
|
1242
|
+
- name: generator
|
|
1243
|
+
content: Diplodoc Platform vDIPLODOC-VERSION
|
|
1244
|
+
vcsPath: includes/level11.md
|
|
1245
|
+
---
|
|
1246
|
+
# Level 11 svg header <svg width="20px" height="20px" viewBox="0 0 512 512" enable-background="new 0 0 512 512" id="rnd-hash__search" version="1.1" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="rnd-hash__search_1_"><linearGradient gradientUnits="userSpaceOnUse" id="rnd-hash__SVGID_1_" x1="57.9473" x2="407.9511" y1="351.4531" y2="149.3783"><stop offset="0" stop-color="#F14D5C"/><stop offset="0.1309" stop-color="#F05454"/><stop offset="0.3346" stop-color="#3bf488"/><stop offset="0.3492" stop-color="#ED683C"/><stop offset="0.714" stop-color="#1e15a3"/><stop offset="1" stop-color="#FDC70C"/></linearGradient><path d="M300.766,87.509c-33.056,0-64.133,12.873-87.507,36.246c-23.374,23.374-36.247,54.451-36.247,87.507 c0,24.234,6.927,47.4,19.83,67.252l-12.669,12.669c0,0.001-0.001,0.001-0.001,0.001l-90.664,90.665 c-8.353,8.354-7.88,22.418,1.055,31.353l4.261,4.262c4.669,4.668,10.736,7.028,16.658,7.028c5.417,0,10.713-1.976,14.703-5.966 l15.405-15.405l75.259-75.259l12.671-12.672c19.85,12.9,43.014,19.826,67.246,19.826c33.056,0,64.133-12.873,87.506-36.247 c48.252-48.251,48.252-126.762,0-175.014C364.898,100.382,333.821,87.509,300.766,87.509z M138.518,396.049 c-4.454,4.453-12.178,3.979-17.219-1.063l-4.261-4.262c-5.036-5.035-5.509-12.756-1.055-17.21l71.38-71.38 c3.284,4.164,6.834,8.16,10.601,11.926c3.766,3.766,7.764,7.318,11.935,10.607L138.518,396.049z M105.894,410.391l-4.261-4.26 c-5.036-5.036-5.509-12.757-1.055-17.211l2.902-2.902c0.936,4.27,3.101,8.393,6.486,11.779l4.261,4.26 c3.392,3.393,7.523,5.549,11.799,6.483l-2.914,2.914C118.658,415.908,110.934,415.432,105.894,410.391z M213.788,320.779 c0.002-0.003,0.005-0.006,0.007-0.008l0,0L213.788,320.779z M217.033,317.534c-4.201-3.248-8.229-6.775-11.998-10.544 c-3.771-3.771-7.295-7.797-10.537-11.99l8.214-8.214c3.233,4.181,6.749,8.185,10.547,11.982c3.8,3.8,7.806,7.317,11.989,10.552 L217.033,317.534z M381.201,291.697c-21.485,21.485-50.052,33.318-80.436,33.318c-30.385,0-58.951-11.833-80.436-33.318 c-21.485-21.484-33.318-50.051-33.318-80.436s11.833-58.95,33.318-80.436c21.485-21.485,50.051-33.317,80.436-33.317 c30.384,0,58.95,11.832,80.436,33.317C425.553,175.179,425.553,247.346,381.201,291.697z" fill="url(#rnd-hash__SVGID_1_)"/><path d="M258.117,115.27l3.604,9.328c2.592-1.001,5.267-1.887,7.949-2.632l-2.676-9.636 C263.998,113.162,261.012,114.151,258.117,115.27z" fill="#3bf488ff"/><path d="M206.264,162.886l8.985,4.389c8.299-16.992,22.191-30.997,39.118-39.433l-4.46-8.95 C231.022,128.304,215.523,143.928,206.264,162.886z" fill="#1e15a3ff"/></g></svg>
|
|
1061
1247
|
"
|
|
1062
1248
|
`;
|
|
1063
1249
|
|
|
1064
1250
|
exports[`Preprocess > HashIncludes=true,Autotitles=true,Svg=true 10`] = `
|
|
1251
|
+
"Bob
|
|
1252
|
+
"
|
|
1253
|
+
`;
|
|
1254
|
+
|
|
1255
|
+
exports[`Preprocess > HashIncludes=true,Autotitles=true,Svg=true 11`] = `
|
|
1065
1256
|
"Link to mermaid diagram from 2 level
|
|
1066
1257
|
[Mermaid usage](../../mermaid.md)
|
|
1067
1258
|
|
|
@@ -1069,17 +1260,17 @@ exports[`Preprocess > HashIncludes=true,Autotitles=true,Svg=true 10`] = `
|
|
|
1069
1260
|
Bob"
|
|
1070
1261
|
`;
|
|
1071
1262
|
|
|
1072
|
-
exports[`Preprocess > HashIncludes=true,Autotitles=true,Svg=true
|
|
1263
|
+
exports[`Preprocess > HashIncludes=true,Autotitles=true,Svg=true 12`] = `
|
|
1073
1264
|
"Test
|
|
1074
1265
|
"
|
|
1075
1266
|
`;
|
|
1076
1267
|
|
|
1077
|
-
exports[`Preprocess > HashIncludes=true,Autotitles=true,Svg=true
|
|
1268
|
+
exports[`Preprocess > HashIncludes=true,Autotitles=true,Svg=true 13`] = `
|
|
1078
1269
|
"Bob
|
|
1079
1270
|
"
|
|
1080
1271
|
`;
|
|
1081
1272
|
|
|
1082
|
-
exports[`Preprocess > HashIncludes=true,Autotitles=true,Svg=true
|
|
1273
|
+
exports[`Preprocess > HashIncludes=true,Autotitles=true,Svg=true 14`] = `
|
|
1083
1274
|
"---
|
|
1084
1275
|
metadata:
|
|
1085
1276
|
- name: generator
|
|
@@ -1092,7 +1283,66 @@ $/sqrt{3x-1}+(1+x)^2$
|
|
|
1092
1283
|
"
|
|
1093
1284
|
`;
|
|
1094
1285
|
|
|
1095
|
-
exports[`Preprocess > HashIncludes=true,Autotitles=true,Svg=true
|
|
1286
|
+
exports[`Preprocess > HashIncludes=true,Autotitles=true,Svg=true 15`] = `
|
|
1287
|
+
"---
|
|
1288
|
+
metadata:
|
|
1289
|
+
- name: generator
|
|
1290
|
+
content: Diplodoc Platform vDIPLODOC-VERSION
|
|
1291
|
+
vcsPath: level0.md
|
|
1292
|
+
---
|
|
1293
|
+
# Level root svg header <svg width="20px" height="20px" viewBox="0 0 512 512" enable-background="new 0 0 512 512" id="rnd-hash__search" version="1.1" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="rnd-hash__search_1_"><linearGradient gradientUnits="userSpaceOnUse" id="rnd-hash__SVGID_1_" x1="57.9473" x2="407.9511" y1="351.4531" y2="149.3783"><stop offset="0" stop-color="#F14D5C"/><stop offset="0.1309" stop-color="#F05454"/><stop offset="0.3346" stop-color="#3bf488"/><stop offset="0.3492" stop-color="#ED683C"/><stop offset="0.714" stop-color="#1e15a3"/><stop offset="1" stop-color="#FDC70C"/></linearGradient><path d="M300.766,87.509c-33.056,0-64.133,12.873-87.507,36.246c-23.374,23.374-36.247,54.451-36.247,87.507 c0,24.234,6.927,47.4,19.83,67.252l-12.669,12.669c0,0.001-0.001,0.001-0.001,0.001l-90.664,90.665 c-8.353,8.354-7.88,22.418,1.055,31.353l4.261,4.262c4.669,4.668,10.736,7.028,16.658,7.028c5.417,0,10.713-1.976,14.703-5.966 l15.405-15.405l75.259-75.259l12.671-12.672c19.85,12.9,43.014,19.826,67.246,19.826c33.056,0,64.133-12.873,87.506-36.247 c48.252-48.251,48.252-126.762,0-175.014C364.898,100.382,333.821,87.509,300.766,87.509z M138.518,396.049 c-4.454,4.453-12.178,3.979-17.219-1.063l-4.261-4.262c-5.036-5.035-5.509-12.756-1.055-17.21l71.38-71.38 c3.284,4.164,6.834,8.16,10.601,11.926c3.766,3.766,7.764,7.318,11.935,10.607L138.518,396.049z M105.894,410.391l-4.261-4.26 c-5.036-5.036-5.509-12.757-1.055-17.211l2.902-2.902c0.936,4.27,3.101,8.393,6.486,11.779l4.261,4.26 c3.392,3.393,7.523,5.549,11.799,6.483l-2.914,2.914C118.658,415.908,110.934,415.432,105.894,410.391z M213.788,320.779 c0.002-0.003,0.005-0.006,0.007-0.008l0,0L213.788,320.779z M217.033,317.534c-4.201-3.248-8.229-6.775-11.998-10.544 c-3.771-3.771-7.295-7.797-10.537-11.99l8.214-8.214c3.233,4.181,6.749,8.185,10.547,11.982c3.8,3.8,7.806,7.317,11.989,10.552 L217.033,317.534z M381.201,291.697c-21.485,21.485-50.052,33.318-80.436,33.318c-30.385,0-58.951-11.833-80.436-33.318 c-21.485-21.484-33.318-50.051-33.318-80.436s11.833-58.95,33.318-80.436c21.485-21.485,50.051-33.317,80.436-33.317 c30.384,0,58.95,11.832,80.436,33.317C425.553,175.179,425.553,247.346,381.201,291.697z" fill="url(#rnd-hash__SVGID_1_)"/><path d="M258.117,115.27l3.604,9.328c2.592-1.001,5.267-1.887,7.949-2.632l-2.676-9.636 C263.998,113.162,261.012,114.151,258.117,115.27z" fill="#3bf488ff"/><path d="M206.264,162.886l8.985,4.389c8.299-16.992,22.191-30.997,39.118-39.433l-4.46-8.95 C231.022,128.304,215.523,143.928,206.264,162.886z" fill="#1e15a3ff"/></g></svg>
|
|
1294
|
+
|
|
1295
|
+
[Images ](images.md)
|
|
1296
|
+
|
|
1297
|
+
[Level 1 svg header ](level1/level1.md)
|
|
1298
|
+
|
|
1299
|
+
[Level 2 svg header ](level1/level2/level2.md)
|
|
1300
|
+
"
|
|
1301
|
+
`;
|
|
1302
|
+
|
|
1303
|
+
exports[`Preprocess > HashIncludes=true,Autotitles=true,Svg=true 16`] = `
|
|
1304
|
+
"---
|
|
1305
|
+
metadata:
|
|
1306
|
+
- name: generator
|
|
1307
|
+
content: Diplodoc Platform vDIPLODOC-VERSION
|
|
1308
|
+
vcsPath: level1/level1.md
|
|
1309
|
+
---
|
|
1310
|
+
# Level 1 svg header <svg width="20px" height="20px" viewBox="0 0 512 512" enable-background="new 0 0 512 512" id="rnd-hash__search" version="1.1" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="rnd-hash__search_1_"><linearGradient gradientUnits="userSpaceOnUse" id="rnd-hash__SVGID_1_" x1="57.9473" x2="407.9511" y1="351.4531" y2="149.3783"><stop offset="0" stop-color="#F14D5C"/><stop offset="0.1309" stop-color="#F05454"/><stop offset="0.3346" stop-color="#3bf488"/><stop offset="0.3492" stop-color="#ED683C"/><stop offset="0.714" stop-color="#1e15a3"/><stop offset="1" stop-color="#FDC70C"/></linearGradient><path d="M300.766,87.509c-33.056,0-64.133,12.873-87.507,36.246c-23.374,23.374-36.247,54.451-36.247,87.507 c0,24.234,6.927,47.4,19.83,67.252l-12.669,12.669c0,0.001-0.001,0.001-0.001,0.001l-90.664,90.665 c-8.353,8.354-7.88,22.418,1.055,31.353l4.261,4.262c4.669,4.668,10.736,7.028,16.658,7.028c5.417,0,10.713-1.976,14.703-5.966 l15.405-15.405l75.259-75.259l12.671-12.672c19.85,12.9,43.014,19.826,67.246,19.826c33.056,0,64.133-12.873,87.506-36.247 c48.252-48.251,48.252-126.762,0-175.014C364.898,100.382,333.821,87.509,300.766,87.509z M138.518,396.049 c-4.454,4.453-12.178,3.979-17.219-1.063l-4.261-4.262c-5.036-5.035-5.509-12.756-1.055-17.21l71.38-71.38 c3.284,4.164,6.834,8.16,10.601,11.926c3.766,3.766,7.764,7.318,11.935,10.607L138.518,396.049z M105.894,410.391l-4.261-4.26 c-5.036-5.036-5.509-12.757-1.055-17.211l2.902-2.902c0.936,4.27,3.101,8.393,6.486,11.779l4.261,4.26 c3.392,3.393,7.523,5.549,11.799,6.483l-2.914,2.914C118.658,415.908,110.934,415.432,105.894,410.391z M213.788,320.779 c0.002-0.003,0.005-0.006,0.007-0.008l0,0L213.788,320.779z M217.033,317.534c-4.201-3.248-8.229-6.775-11.998-10.544 c-3.771-3.771-7.295-7.797-10.537-11.99l8.214-8.214c3.233,4.181,6.749,8.185,10.547,11.982c3.8,3.8,7.806,7.317,11.989,10.552 L217.033,317.534z M381.201,291.697c-21.485,21.485-50.052,33.318-80.436,33.318c-30.385,0-58.951-11.833-80.436-33.318 c-21.485-21.484-33.318-50.051-33.318-80.436s11.833-58.95,33.318-80.436c21.485-21.485,50.051-33.317,80.436-33.317 c30.384,0,58.95,11.832,80.436,33.317C425.553,175.179,425.553,247.346,381.201,291.697z" fill="url(#rnd-hash__SVGID_1_)"/><path d="M258.117,115.27l3.604,9.328c2.592-1.001,5.267-1.887,7.949-2.632l-2.676-9.636 C263.998,113.162,261.012,114.151,258.117,115.27z" fill="#3bf488ff"/><path d="M206.264,162.886l8.985,4.389c8.299-16.992,22.191-30.997,39.118-39.433l-4.46-8.95 C231.022,128.304,215.523,143.928,206.264,162.886z" fill="#1e15a3ff"/></g></svg>
|
|
1311
|
+
|
|
1312
|
+
[Level root svg header ](../level0.md)
|
|
1313
|
+
|
|
1314
|
+
[Level 2 svg header ](level2/level2.md)
|
|
1315
|
+
|
|
1316
|
+
[Level 11 svg header ](../includes/level11.md)"
|
|
1317
|
+
`;
|
|
1318
|
+
|
|
1319
|
+
exports[`Preprocess > HashIncludes=true,Autotitles=true,Svg=true 17`] = `
|
|
1320
|
+
"---
|
|
1321
|
+
metadata:
|
|
1322
|
+
- name: generator
|
|
1323
|
+
content: Diplodoc Platform vDIPLODOC-VERSION
|
|
1324
|
+
vcsPath: level1/level2/level2.md
|
|
1325
|
+
---
|
|
1326
|
+
# Level 2 svg header <svg width="20px" height="20px" viewBox="0 0 512 512" enable-background="new 0 0 512 512" id="rnd-hash__search" version="1.1" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="rnd-hash__search_1_"><linearGradient gradientUnits="userSpaceOnUse" id="rnd-hash__SVGID_1_" x1="57.9473" x2="407.9511" y1="351.4531" y2="149.3783"><stop offset="0" stop-color="#F14D5C"/><stop offset="0.1309" stop-color="#F05454"/><stop offset="0.3346" stop-color="#3bf488"/><stop offset="0.3492" stop-color="#ED683C"/><stop offset="0.714" stop-color="#1e15a3"/><stop offset="1" stop-color="#FDC70C"/></linearGradient><path d="M300.766,87.509c-33.056,0-64.133,12.873-87.507,36.246c-23.374,23.374-36.247,54.451-36.247,87.507 c0,24.234,6.927,47.4,19.83,67.252l-12.669,12.669c0,0.001-0.001,0.001-0.001,0.001l-90.664,90.665 c-8.353,8.354-7.88,22.418,1.055,31.353l4.261,4.262c4.669,4.668,10.736,7.028,16.658,7.028c5.417,0,10.713-1.976,14.703-5.966 l15.405-15.405l75.259-75.259l12.671-12.672c19.85,12.9,43.014,19.826,67.246,19.826c33.056,0,64.133-12.873,87.506-36.247 c48.252-48.251,48.252-126.762,0-175.014C364.898,100.382,333.821,87.509,300.766,87.509z M138.518,396.049 c-4.454,4.453-12.178,3.979-17.219-1.063l-4.261-4.262c-5.036-5.035-5.509-12.756-1.055-17.21l71.38-71.38 c3.284,4.164,6.834,8.16,10.601,11.926c3.766,3.766,7.764,7.318,11.935,10.607L138.518,396.049z M105.894,410.391l-4.261-4.26 c-5.036-5.036-5.509-12.757-1.055-17.211l2.902-2.902c0.936,4.27,3.101,8.393,6.486,11.779l4.261,4.26 c3.392,3.393,7.523,5.549,11.799,6.483l-2.914,2.914C118.658,415.908,110.934,415.432,105.894,410.391z M213.788,320.779 c0.002-0.003,0.005-0.006,0.007-0.008l0,0L213.788,320.779z M217.033,317.534c-4.201-3.248-8.229-6.775-11.998-10.544 c-3.771-3.771-7.295-7.797-10.537-11.99l8.214-8.214c3.233,4.181,6.749,8.185,10.547,11.982c3.8,3.8,7.806,7.317,11.989,10.552 L217.033,317.534z M381.201,291.697c-21.485,21.485-50.052,33.318-80.436,33.318c-30.385,0-58.951-11.833-80.436-33.318 c-21.485-21.484-33.318-50.051-33.318-80.436s11.833-58.95,33.318-80.436c21.485-21.485,50.051-33.317,80.436-33.317 c30.384,0,58.95,11.832,80.436,33.317C425.553,175.179,425.553,247.346,381.201,291.697z" fill="url(#rnd-hash__SVGID_1_)"/><path d="M258.117,115.27l3.604,9.328c2.592-1.001,5.267-1.887,7.949-2.632l-2.676-9.636 C263.998,113.162,261.012,114.151,258.117,115.27z" fill="#3bf488ff"/><path d="M206.264,162.886l8.985,4.389c8.299-16.992,22.191-30.997,39.118-39.433l-4.46-8.95 C231.022,128.304,215.523,143.928,206.264,162.886z" fill="#1e15a3ff"/></g></svg>
|
|
1327
|
+
|
|
1328
|
+
[Level 1 svg header ](../level1.md)
|
|
1329
|
+
|
|
1330
|
+
[Level root svg header ](../../level0.md)
|
|
1331
|
+
|
|
1332
|
+
"
|
|
1333
|
+
`;
|
|
1334
|
+
|
|
1335
|
+
exports[`Preprocess > HashIncludes=true,Autotitles=true,Svg=true 18`] = `
|
|
1336
|
+
"items:
|
|
1337
|
+
- name: level1
|
|
1338
|
+
href: level1.md
|
|
1339
|
+
- name: level2
|
|
1340
|
+
href: level2/level2.md
|
|
1341
|
+
path: level1/toc.yaml
|
|
1342
|
+
"
|
|
1343
|
+
`;
|
|
1344
|
+
|
|
1345
|
+
exports[`Preprocess > HashIncludes=true,Autotitles=true,Svg=true 19`] = `
|
|
1096
1346
|
"---
|
|
1097
1347
|
metadata:
|
|
1098
1348
|
- name: generator
|
|
@@ -1115,7 +1365,7 @@ Some mermaid info
|
|
|
1115
1365
|
"
|
|
1116
1366
|
`;
|
|
1117
1367
|
|
|
1118
|
-
exports[`Preprocess > HashIncludes=true,Autotitles=true,Svg=true
|
|
1368
|
+
exports[`Preprocess > HashIncludes=true,Autotitles=true,Svg=true 20`] = `
|
|
1119
1369
|
"---
|
|
1120
1370
|
metadata:
|
|
1121
1371
|
- name: generator
|
|
@@ -1132,7 +1382,7 @@ Item 1 text
|
|
|
1132
1382
|
"
|
|
1133
1383
|
`;
|
|
1134
1384
|
|
|
1135
|
-
exports[`Preprocess > HashIncludes=true,Autotitles=true,Svg=true
|
|
1385
|
+
exports[`Preprocess > HashIncludes=true,Autotitles=true,Svg=true 21`] = `
|
|
1136
1386
|
"items:
|
|
1137
1387
|
- name: Md item with not_var syntax
|
|
1138
1388
|
href: 1.md
|
|
@@ -1154,6 +1404,14 @@ exports[`Preprocess > HashIncludes=true,Autotitles=true,Svg=true 16`] = `
|
|
|
1154
1404
|
href: autotitle.md
|
|
1155
1405
|
- name: includes
|
|
1156
1406
|
href: includes.md
|
|
1407
|
+
- name: level11
|
|
1408
|
+
href: includes/level11.md
|
|
1409
|
+
- name: level0
|
|
1410
|
+
href: level0.md
|
|
1411
|
+
- name: level1
|
|
1412
|
+
href: level1/level1.md
|
|
1413
|
+
- name: level2
|
|
1414
|
+
href: level1/level2/level2.md
|
|
1157
1415
|
path: toc.yaml
|
|
1158
1416
|
"
|
|
1159
1417
|
`;
|
|
@@ -93,8 +93,8 @@ exports[`Generate html document with correct lang and dir attributes. Load corre
|
|
|
93
93
|
<base href="../" />
|
|
94
94
|
<title>Documentation | Documentation</title>
|
|
95
95
|
<link rel="canonical" href="ar/index.html">
|
|
96
|
-
<link rel="alternate" href="en/index.html" hreflang="en" />
|
|
97
96
|
<link rel="alternate" href="ar/index.html" hreflang="ar" />
|
|
97
|
+
<link rel="alternate" href="en/index.html" hreflang="en" />
|
|
98
98
|
<meta name="generator" content="Diplodoc Platform vDIPLODOC-VERSION">
|
|
99
99
|
<style type="text/css">html, body {min-height:100vh; height:100vh;}</style>
|
|
100
100
|
</head>
|
|
@@ -124,8 +124,8 @@ exports[`Generate html document with correct lang and dir attributes. Load corre
|
|
|
124
124
|
<base href="../" />
|
|
125
125
|
<title>Documentation</title>
|
|
126
126
|
<link rel="canonical" href="ar/page.html">
|
|
127
|
-
<link rel="alternate" href="en/page.html" hreflang="en" />
|
|
128
127
|
<link rel="alternate" href="ar/page.html" hreflang="ar" />
|
|
128
|
+
<link rel="alternate" href="en/page.html" hreflang="en" />
|
|
129
129
|
<meta name="generator" content="Diplodoc Platform vDIPLODOC-VERSION">
|
|
130
130
|
<style type="text/css">html, body {min-height:100vh; height:100vh;}</style>
|
|
131
131
|
</head>
|
|
@@ -157,8 +157,8 @@ exports[`Generate html document with correct lang and dir attributes. Load corre
|
|
|
157
157
|
<base href="../" />
|
|
158
158
|
<title>Documentation | Documentation</title>
|
|
159
159
|
<link rel="canonical" href="en/index.html">
|
|
160
|
-
<link rel="alternate" href="en/index.html" hreflang="en" />
|
|
161
160
|
<link rel="alternate" href="ar/index.html" hreflang="ar" />
|
|
161
|
+
<link rel="alternate" href="en/index.html" hreflang="en" />
|
|
162
162
|
<meta name="generator" content="Diplodoc Platform vDIPLODOC-VERSION">
|
|
163
163
|
<style type="text/css">html, body {min-height:100vh; height:100vh;}</style>
|
|
164
164
|
</head>
|
|
@@ -188,8 +188,8 @@ exports[`Generate html document with correct lang and dir attributes. Load corre
|
|
|
188
188
|
<base href="../" />
|
|
189
189
|
<title>Documentation</title>
|
|
190
190
|
<link rel="canonical" href="en/page.html">
|
|
191
|
-
<link rel="alternate" href="en/page.html" hreflang="en" />
|
|
192
191
|
<link rel="alternate" href="ar/page.html" hreflang="ar" />
|
|
192
|
+
<link rel="alternate" href="en/page.html" hreflang="en" />
|
|
193
193
|
<meta name="generator" content="Diplodoc Platform vDIPLODOC-VERSION">
|
|
194
194
|
<meta name="yfm" content="builder">
|
|
195
195
|
<style type="text/css">html, body {min-height:100vh; height:100vh;}</style>
|
package/e2e/alternates.test.ts
CHANGED
package/e2e/bundles.spec.ts
CHANGED
package/e2e/errors.spec.ts
CHANGED
|
@@ -1,45 +1,55 @@
|
|
|
1
1
|
import type {Report} from '../fixtures/runners/types';
|
|
2
2
|
|
|
3
3
|
import {describe, expect, it} from 'vitest';
|
|
4
|
+
|
|
4
5
|
import {TestAdapter, getTestPaths} from '../fixtures';
|
|
5
6
|
|
|
6
7
|
type TestResult = {
|
|
7
8
|
md: Report;
|
|
8
9
|
html: Report;
|
|
9
|
-
}
|
|
10
|
+
};
|
|
10
11
|
|
|
11
12
|
function test(path: string, expect: Function) {
|
|
12
13
|
it(path, async () => {
|
|
13
14
|
const {inputPath, outputPath} = getTestPaths(path);
|
|
14
15
|
|
|
15
16
|
const md = await TestAdapter.build.run(inputPath, outputPath, ['-j2', '-f', 'md']);
|
|
16
|
-
const html = await TestAdapter.build.run(inputPath, outputPath + '-html', [
|
|
17
|
+
const html = await TestAdapter.build.run(inputPath, outputPath + '-html', [
|
|
18
|
+
'-j2',
|
|
19
|
+
'-f',
|
|
20
|
+
'html',
|
|
21
|
+
]);
|
|
17
22
|
return expect({md, html});
|
|
18
23
|
});
|
|
19
24
|
}
|
|
20
25
|
|
|
21
|
-
|
|
22
26
|
describe('Errors', () => {
|
|
23
27
|
test('mocks/errors/unreachable-link', ({html}: TestResult) => {
|
|
24
28
|
expectErrors(html, [
|
|
25
29
|
'ERR index.md: 1: YFM003 / unreachable-link Link is unreachable [Context: "[Unreachable link: "exists.html"][existing file](./exists.md)"]',
|
|
26
|
-
'ERR index.md: 2: YFM003 / unreachable-link Link is unreachable [Context: "[Unreachable link: "missed.html"][missed file](./missed.md)"]'
|
|
30
|
+
'ERR index.md: 2: YFM003 / unreachable-link Link is unreachable [Context: "[Unreachable link: "missed.html"][missed file](./missed.md)"]',
|
|
27
31
|
]);
|
|
28
32
|
});
|
|
29
33
|
|
|
30
34
|
it('translate extract with filtered links', async () => {
|
|
31
35
|
const {inputPath, outputPath} = getTestPaths('mocks/errors/extract-filtered-link');
|
|
32
36
|
|
|
33
|
-
const result = await TestAdapter.extract.run(inputPath, outputPath, [
|
|
34
|
-
|
|
37
|
+
const result = await TestAdapter.extract.run(inputPath, outputPath, [
|
|
38
|
+
'--source',
|
|
39
|
+
'ru-RU',
|
|
40
|
+
'--target',
|
|
41
|
+
'es-ES',
|
|
42
|
+
'--filter',
|
|
43
|
+
]);
|
|
44
|
+
|
|
35
45
|
expect(result.code).toEqual(1);
|
|
36
|
-
|
|
46
|
+
|
|
37
47
|
expect(result.errors).toEqual([
|
|
38
48
|
"ERR File index.md contains link to filtered.md, which was filtered from toc.yaml or it's not been included initially",
|
|
39
49
|
"ERR File index.md contains link to filtered2.md, which was filtered from toc.yaml or it's not been included initially",
|
|
40
50
|
"ERR File index.md contains link to filtered2.md, which was filtered from toc.yaml or it's not been included initially",
|
|
41
51
|
"ERR File index.md contains link to filtered3.md, which was filtered from toc.yaml or it's not been included initially",
|
|
42
|
-
])
|
|
52
|
+
]);
|
|
43
53
|
});
|
|
44
54
|
});
|
|
45
55
|
|
package/e2e/generate-map.spec.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import {describe, expect, test} from 'vitest';
|
|
2
|
-
import {TestAdapter, bundleless, getFileContent, getTestPaths} from '../fixtures';
|
|
3
2
|
import {join} from 'node:path';
|
|
4
3
|
import {readFile} from 'node:fs/promises';
|
|
5
4
|
|
|
5
|
+
import {TestAdapter, bundleless, getFileContent, getTestPaths} from '../fixtures';
|
|
6
|
+
|
|
6
7
|
const generateMapTestTemplate = (
|
|
7
8
|
testTitle: string,
|
|
8
9
|
testRootPath: string,
|
|
@@ -19,7 +20,10 @@ const generateMapTestTemplate = (
|
|
|
19
20
|
});
|
|
20
21
|
|
|
21
22
|
const content = getFileContent(join(outputPath, 'files.json'));
|
|
22
|
-
const manifestContent = await readFile(
|
|
23
|
+
const manifestContent = await readFile(
|
|
24
|
+
join(outputPath, 'yfm-build-manifest.json'),
|
|
25
|
+
'utf-8',
|
|
26
|
+
);
|
|
23
27
|
|
|
24
28
|
expect(bundleless(content)).toMatchSnapshot();
|
|
25
29
|
expect(JSON.parse(manifestContent)).toMatchSnapshot();
|
package/e2e/include-toc.test.ts
CHANGED