@@ -35,6 +35,7 @@ describe('sync-zod2md-setup generator', () => {
3535 } ,
3636 tags : [ ] ,
3737 } ;
38+
3839 beforeEach ( async ( ) => {
3940 tree = await generateWorkspaceAndProject ( {
4041 name : 'test' ,
@@ -67,13 +68,15 @@ describe('sync-zod2md-setup generator', () => {
6768 } ,
6869 } ) ) ;
6970 } ) ;
71+
7072 it ( 'should pass if missing zod2md.config' , async ( ) => {
7173 tree . delete ( zod2mdConfigPath ) ;
7274 await expect ( syncZod2mdSetupGenerator ( tree ) ) . resolves . toStrictEqual ( {
7375 outOfSyncMessage : undefined ,
7476 } ) ;
7577 expect ( tree . exists ( zod2mdConfigPath ) ) . toBeFalse ( ) ;
7678 } ) ;
79+
7780 it ( 'should fail if missing tsconfig file' , async ( ) => {
7881 tree . delete ( `${ projectRoot } /tsconfig.json` ) ;
7982 tree . delete ( `${ projectRoot } /tsconfig.lib.json` ) ;
@@ -83,6 +86,7 @@ describe('sync-zod2md-setup generator', () => {
8386 } ) ;
8487 expect ( tree . exists ( `${ projectRoot } /zod2md.config.ts` ) ) . toBeTrue ( ) ;
8588 } ) ;
89+
8690 it ( 'should fail if missing "zod2md" target in project config' , async ( ) => {
8791 updateJson ( tree , `${ projectRoot } /project.json` , config => ( {
8892 ...config ,
@@ -125,6 +129,7 @@ describe('sync-zod2md-setup generator', () => {
125129 } ) ;
126130 expect ( tree . exists ( `${ projectRoot } /zod2md.config.ts` ) ) . toBeTrue ( ) ;
127131 } ) ;
132+
128133 it ( 'should fail if missing "dependsOn" targets in build target' , async ( ) => {
129134 updateJson ( tree , `${ projectRoot } /project.json` , config => ( {
130135 ...config ,
@@ -161,6 +166,7 @@ describe('sync-zod2md-setup generator', () => {
161166 } ) ;
162167 expect ( tree . exists ( `${ projectRoot } /zod2md.config.ts` ) ) . toBeTrue ( ) ;
163168 } ) ;
169+
164170 it ( 'should fail if missing Zod2Md TypeScript plugin configuration' , async ( ) => {
165171 updateJson ( tree , `${ projectRoot } /tsconfig.lib.json` , config => ( {
166172 ...config ,
@@ -176,11 +182,13 @@ describe('sync-zod2md-setup generator', () => {
176182 } ) ;
177183 expect ( tree . exists ( `${ projectRoot } /zod2md.config.ts` ) ) . toBeTrue ( ) ;
178184 } ) ;
185+
179186 it ( 'should pass if zod2md setup is correct' , async ( ) => {
180187 await expect ( syncZod2mdSetupGenerator ( tree ) ) . resolves . toStrictEqual ( {
181188 outOfSyncMessage : undefined ,
182189 } ) ;
183190 } ) ;
191+
184192 it ( 'should not duplicate dependencies when they exist as objects' , async ( ) => {
185193 const objectFormDependsOn = [
186194 '^build' ,
0 commit comments