1- import { execa } from ' execa' ;
2- import { join } from ' path' ;
3- import { test } from ' vitest' ;
1+ import { execa } from " execa" ;
2+ import { join } from " path" ;
3+ import { test } from " vitest" ;
44
55async function checkAllUnder ( path : string , responseCache ?: string ) {
6- const repoRoot = join ( __dirname , '..' , '..' , '..' , '..' ) ;
7- const script = join ( ' eng' , ' scripts' , ' TypeSpec-Requirement.ps1' ) ;
6+ const repoRoot = join ( __dirname , ".." , ".." , ".." , ".." ) ;
7+ const script = join ( " eng" , " scripts" , " TypeSpec-Requirement.ps1" ) ;
88
99 let command = `${ script } -CheckAllUnder ${ join ( __dirname , path ) } ` ;
1010 if ( responseCache ) {
@@ -52,7 +52,7 @@ test.concurrent("Generated from TypeSpec", async ({ expect }) => {
5252test . concurrent ( "Hand-written, exists in main" , async ( { expect } ) => {
5353 const { stdout, exitCode } = await checkAllUnder (
5454 "specification/hand-written" ,
55- '@{"https://github.com/Azure/azure-rest-api-specs/tree/main/specification/hand-written/resource-manager/Microsoft.HandWritten/stable"=200}'
55+ '@{"https://github.com/Azure/azure-rest-api-specs/tree/main/specification/hand-written/resource-manager/Microsoft.HandWritten/stable"=200}' ,
5656 ) ;
5757
5858 expect ( stdout ) . toContain ( "was not generated from TypeSpec" ) ;
@@ -63,7 +63,7 @@ test.concurrent("Hand-written, exists in main", async ({ expect }) => {
6363test . concurrent ( "Hand-written, does not exist in main" , async ( { expect } ) => {
6464 const { stdout, exitCode } = await checkAllUnder (
6565 "specification/hand-written" ,
66- '@{"https://github.com/Azure/azure-rest-api-specs/tree/main/specification/hand-written/resource-manager/Microsoft.HandWritten/stable"=404}'
66+ '@{"https://github.com/Azure/azure-rest-api-specs/tree/main/specification/hand-written/resource-manager/Microsoft.HandWritten/stable"=404}' ,
6767 ) ;
6868
6969 expect ( stdout ) . toContain ( "was not generated from TypeSpec" ) ;
@@ -74,7 +74,7 @@ test.concurrent("Hand-written, does not exist in main", async ({ expect }) => {
7474test . concurrent ( "Hand-written, unexpected response checking main" , async ( { expect } ) => {
7575 const { stdout, stderr, exitCode } = await checkAllUnder (
7676 "specification/hand-written" ,
77- '@{"https://github.com/Azure/azure-rest-api-specs/tree/main/specification/hand-written/resource-manager/Microsoft.HandWritten/stable"=519}'
77+ '@{"https://github.com/Azure/azure-rest-api-specs/tree/main/specification/hand-written/resource-manager/Microsoft.HandWritten/stable"=519}' ,
7878 ) ;
7979
8080 expect ( stdout ) . toContain ( "was not generated from TypeSpec" ) ;
0 commit comments