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" ;
4
4
5
5
async 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" ) ;
8
8
9
9
let command = `${ script } -CheckAllUnder ${ join ( __dirname , path ) } ` ;
10
10
if ( responseCache ) {
@@ -52,7 +52,7 @@ test.concurrent("Generated from TypeSpec", async ({ expect }) => {
52
52
test . concurrent ( "Hand-written, exists in main" , async ( { expect } ) => {
53
53
const { stdout, exitCode } = await checkAllUnder (
54
54
"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}' ,
56
56
) ;
57
57
58
58
expect ( stdout ) . toContain ( "was not generated from TypeSpec" ) ;
@@ -63,7 +63,7 @@ test.concurrent("Hand-written, exists in main", async ({ expect }) => {
63
63
test . concurrent ( "Hand-written, does not exist in main" , async ( { expect } ) => {
64
64
const { stdout, exitCode } = await checkAllUnder (
65
65
"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}' ,
67
67
) ;
68
68
69
69
expect ( stdout ) . toContain ( "was not generated from TypeSpec" ) ;
@@ -74,7 +74,7 @@ test.concurrent("Hand-written, does not exist in main", async ({ expect }) => {
74
74
test . concurrent ( "Hand-written, unexpected response checking main" , async ( { expect } ) => {
75
75
const { stdout, stderr, exitCode } = await checkAllUnder (
76
76
"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}' ,
78
78
) ;
79
79
80
80
expect ( stdout ) . toContain ( "was not generated from TypeSpec" ) ;
0 commit comments