@@ -170,6 +170,17 @@ describe('create-blocks-app auto-detection', () => {
170170 const result = run ( [ '-y' , '--skip-install' ] , tmpDir ) ;
171171 assert . strictEqual ( result . exitCode , 0 ) ;
172172 assert . match ( result . stdout , / D e t e c t e d A m p l i f y G e n 2 p r o j e c t / ) ;
173+ const packageJson = JSON . parse ( readFileSync ( join ( tmpDir , 'package.json' ) , 'utf-8' ) ) ;
174+ const serverPath = join ( tmpDir , 'aws-blocks' , 'scripts' , 'server.ts' ) ;
175+ const generateClientPath = join ( tmpDir , 'aws-blocks' , 'scripts' , 'generate-client.ts' ) ;
176+ const cognitoVerifierPath = join ( tmpDir , 'aws-blocks' , 'cognito-verifier.ts' ) ;
177+ assert . strictEqual ( packageJson . scripts [ 'blocks:dev' ] , 'tsx watch aws-blocks/scripts/server.ts' ) ;
178+ assert . ok ( existsSync ( serverPath ) ) ;
179+ assert . match ( readFileSync ( serverPath , 'utf-8' ) , / s t a r t D e v S e r v e r / ) ;
180+ assert . match ( readFileSync ( generateClientPath , 'utf-8' ) , / f r o m ' @ a w s - b l o c k s \/ b l o c k s \/ s c r i p t s ' / ) ;
181+ assert . match ( readFileSync ( cognitoVerifierPath , 'utf-8' ) , / f r o m ' @ a w s - b l o c k s \/ b l o c k s ' / ) ;
182+ assert . doesNotMatch ( readFileSync ( generateClientPath , 'utf-8' ) , / @ a w s - b l o c k s \/ c o r e / ) ;
183+ assert . doesNotMatch ( readFileSync ( cognitoVerifierPath , 'utf-8' ) , / @ a w s - b l o c k s \/ c o r e / ) ;
173184 } finally {
174185 rmSync ( tmpDir , { recursive : true , force : true , maxRetries : 3 , retryDelay : 100 } ) ;
175186 }
0 commit comments