Skip to content

Commit b88e6ad

Browse files
authored
[TypeSpecRequirement] Format document in tests (#30668)
1 parent 46b3863 commit b88e6ad

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

eng/tools/typespec-requirement/test/typespec-requirement.test.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
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

55
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");
88

99
let command = `${script} -CheckAllUnder ${join(__dirname, path)}`;
1010
if (responseCache) {
@@ -52,7 +52,7 @@ test.concurrent("Generated from TypeSpec", async ({ expect }) => {
5252
test.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 }) => {
6363
test.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 }) => {
7474
test.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

Comments
 (0)