@@ -41,8 +41,17 @@ async function loadYamlFiles(dir: string, selectedFiles?: string[]) {
4141export async function getStaticProps ( ) {
4242 const itemsDirActions = path . join ( fixturesDir , "actions" ) ;
4343 const itemsDirDecorations = path . join ( fixturesDir , "decorations" ) ;
44+ const itemsDirInsertEmptyLines = path . join (
45+ fixturesDir ,
46+ "actions/insertEmptyLines" ,
47+ ) ;
4448
4549 const dataActions = await loadYamlFiles ( itemsDirActions , testSelectedFiles ) ;
50+ const dataInsertEmptyLines = await loadYamlFiles (
51+ itemsDirInsertEmptyLines ,
52+ testSelectedFiles ,
53+ ) ;
54+
4655 const dataDecorations = await loadYamlFiles (
4756 itemsDirDecorations ,
4857 testSelectedFiles ,
@@ -52,17 +61,18 @@ export async function getStaticProps() {
5261
5362 const data = (
5463 await Promise . all (
55- [ ...dataActions , ...dataDecorations ] . map ( async ( val ) => {
56- try {
57- // const upgraded = upgrade(data);
58- const fixture = await loadTestCaseFixture ( val ) ;
59- return { ...fixture , raw : val } ;
60- } catch ( err ) {
61- console . error ( err ) ;
62- data_errors . push ( val ) ;
63- return null ;
64- }
65- } ) ,
64+ [ ...dataActions , ...dataDecorations , ...dataInsertEmptyLines ] . map (
65+ async ( val ) => {
66+ try {
67+ const fixture = await loadTestCaseFixture ( val ) ;
68+ return { ...fixture , raw : val } ;
69+ } catch ( err ) {
70+ console . error ( err ) ;
71+ data_errors . push ( val ) ;
72+ return null ;
73+ }
74+ } ,
75+ ) ,
6676 )
6777 ) . filter ( ( test ) => test !== undefined ) ;
6878
0 commit comments