Skip to content

Commit ae0d6a5

Browse files
fix: Use deno exec path in tests (#17)
1 parent c7e96e4 commit ae0d6a5

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

.github/workflows/publish.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ jobs:
1616
- uses: actions/checkout@v4
1717
- uses: actions/setup-node@v4
1818
with:
19-
node-version: '20.x'
20-
registry-url: 'https://registry.npmjs.org'
19+
node-version: "20.x"
20+
registry-url: "https://registry.npmjs.org"
2121
- uses: denoland/setup-deno@v1
2222
- run: deno run -A scripts/npm.ts
2323
- run: deno publish

tests/petstore/schemas/petstore.yaml

+6-6
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@ paths:
2323
maximum: 100
2424
format: int32
2525
responses:
26-
'200':
26+
"200":
2727
description: A paged array of pets
2828
headers:
2929
x-next:
3030
description: A link to the next page of responses
3131
schema:
3232
type: string
3333
content:
34-
application/json:
34+
application/json:
3535
schema:
3636
$ref: "#/components/schemas/Pets"
3737
default:
@@ -49,10 +49,10 @@ paths:
4949
content:
5050
application/json:
5151
schema:
52-
$ref: '#/components/schemas/Pet'
52+
$ref: "#/components/schemas/Pet"
5353
required: true
5454
responses:
55-
'201':
55+
"201":
5656
description: Null response
5757
default:
5858
description: unexpected error
@@ -74,7 +74,7 @@ paths:
7474
schema:
7575
type: string
7676
responses:
77-
'200':
77+
"200":
7878
description: Expected response to a valid request
7979
content:
8080
application/json:
@@ -116,4 +116,4 @@ components:
116116
type: integer
117117
format: int32
118118
message:
119-
type: string
119+
type: string

tests/test.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Deno.test("Generate schemas", async ({ step }) => {
1414
) {
1515
await step(`Generating schema for ${schema.path}`, async () => {
1616
const path = import.meta.resolve(`../${schema.path}`);
17-
const output = await new Deno.Command("deno", {
17+
const output = await new Deno.Command(Deno.execPath(), {
1818
args: ["run", "-A", main, `-o=${path}.ts`, `--import=${pwd}`, path],
1919
stdout: "inherit",
2020
stderr: "inherit",
@@ -31,7 +31,7 @@ Deno.test("Generate schemas", async ({ step }) => {
3131
const { default: path } = await import(`../${schema.path}`);
3232
const dir = dirname(schema.path);
3333
await step(`Generating schema for ${path}`, async () => {
34-
const output = await new Deno.Command("deno", {
34+
const output = await new Deno.Command(Deno.execPath(), {
3535
args: [
3636
"run",
3737
"-A",
@@ -56,7 +56,7 @@ Deno.test("Check types", async ({ step }) => {
5656
) {
5757
await step(`Checking types for ${test.path}`, async () => {
5858
const path = import.meta.resolve(`../${test.path}`);
59-
const output = await new Deno.Command("deno", {
59+
const output = await new Deno.Command(Deno.execPath(), {
6060
args: ["check", path],
6161
stdout: "inherit",
6262
stderr: "inherit",

0 commit comments

Comments
 (0)