@@ -71,15 +71,44 @@ describe('Local Template Tests', () => {
7171 const result = await validateLocalTemplate ( `${ LOCAL_FIXTURES } /invalid-repo` )
7272
7373 expect ( result . isValid ) . toBe ( false )
74- expect ( result . errors . length ) . toBe ( 4 )
74+ expect ( result . errors . length ) . toBe ( 2 )
7575 } )
7676
7777 it ( 'should fail validation' , async ( ) => {
7878 const packages = await getMonoRepo ( fileReader )
7979 const result = await validateTemplate ( fileReader , packages )
8080
8181 expect ( result . isValid ) . toBe ( false )
82- expect ( result . errors . length ) . toBe ( 4 )
82+ expect ( result . errors . length ) . toBe ( 2 )
83+ } )
84+
85+ it ( 'should handle non-monorepo structure' , async ( ) => {
86+ const packages = await getMonoRepo ( fileReader )
87+
88+ expect ( packages ) . toBeUndefined ( )
89+ } )
90+ } )
91+
92+ describe ( 'app-template' , ( ) => {
93+ const fileReader = new LocalFileReader ( `${ LOCAL_FIXTURES } /app-template` )
94+
95+ it ( 'should validate template using helper successfully' , async ( ) => {
96+ const result = await validateLocalTemplate ( `${ LOCAL_FIXTURES } /app-template` )
97+ if ( ! result . isValid ) {
98+ console . debug ( 'Validation failed with errors:' , result . errors )
99+ }
100+ expect ( result . isValid ) . toBe ( true )
101+ expect ( result . errors ) . toHaveLength ( 0 )
102+ } )
103+
104+ it ( 'should validate template successfully' , async ( ) => {
105+ const packages = await getMonoRepo ( fileReader )
106+ const result = await validateTemplate ( fileReader , packages )
107+ if ( ! result . isValid ) {
108+ console . debug ( 'Validation failed with errors:' , result . errors )
109+ }
110+ expect ( result . isValid ) . toBe ( true )
111+ expect ( result . errors ) . toHaveLength ( 0 )
83112 } )
84113
85114 it ( 'should handle non-monorepo structure' , async ( ) => {
0 commit comments