Skip to content

Commit

Permalink
fix: Use deno exec path in tests (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
eliassjogreen authored Dec 17, 2024
1 parent c7e96e4 commit ae0d6a5
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
node-version: "20.x"
registry-url: "https://registry.npmjs.org"
- uses: denoland/setup-deno@v1
- run: deno run -A scripts/npm.ts
- run: deno publish
Expand Down
12 changes: 6 additions & 6 deletions tests/petstore/schemas/petstore.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ paths:
maximum: 100
format: int32
responses:
'200':
"200":
description: A paged array of pets
headers:
x-next:
description: A link to the next page of responses
schema:
type: string
content:
application/json:
application/json:
schema:
$ref: "#/components/schemas/Pets"
default:
Expand All @@ -49,10 +49,10 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/Pet'
$ref: "#/components/schemas/Pet"
required: true
responses:
'201':
"201":
description: Null response
default:
description: unexpected error
Expand All @@ -74,7 +74,7 @@ paths:
schema:
type: string
responses:
'200':
"200":
description: Expected response to a valid request
content:
application/json:
Expand Down Expand Up @@ -116,4 +116,4 @@ components:
type: integer
format: int32
message:
type: string
type: string
6 changes: 3 additions & 3 deletions tests/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Deno.test("Generate schemas", async ({ step }) => {
) {
await step(`Generating schema for ${schema.path}`, async () => {
const path = import.meta.resolve(`../${schema.path}`);
const output = await new Deno.Command("deno", {
const output = await new Deno.Command(Deno.execPath(), {
args: ["run", "-A", main, `-o=${path}.ts`, `--import=${pwd}`, path],
stdout: "inherit",
stderr: "inherit",
Expand All @@ -31,7 +31,7 @@ Deno.test("Generate schemas", async ({ step }) => {
const { default: path } = await import(`../${schema.path}`);
const dir = dirname(schema.path);
await step(`Generating schema for ${path}`, async () => {
const output = await new Deno.Command("deno", {
const output = await new Deno.Command(Deno.execPath(), {
args: [
"run",
"-A",
Expand All @@ -56,7 +56,7 @@ Deno.test("Check types", async ({ step }) => {
) {
await step(`Checking types for ${test.path}`, async () => {
const path = import.meta.resolve(`../${test.path}`);
const output = await new Deno.Command("deno", {
const output = await new Deno.Command(Deno.execPath(), {
args: ["check", path],
stdout: "inherit",
stderr: "inherit",
Expand Down

0 comments on commit ae0d6a5

Please sign in to comment.