Skip to content

Commit

Permalink
ci: fix windows
Browse files Browse the repository at this point in the history
  • Loading branch information
domoritz committed Apr 23, 2024
1 parent 9043546 commit 54e4366
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/test.yml
Expand Up @@ -12,7 +12,12 @@ jobs:
test:
name: Test

runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4
Expand Down
5 changes: 2 additions & 3 deletions test/minify/index.test.ts
@@ -1,7 +1,6 @@
import { execSync } from "child_process";
import path from "path";

const BIN = path.resolve(__dirname, "../../dist/ts-json-schema-generator.js");
const SCHEMA_PATH = path.resolve(__dirname, "./schema.ts");

const EXPECTED = {
Expand All @@ -22,7 +21,7 @@ const EXPECTED = {

describe("Tests --minify output", () => {
it("With minify", () => {
const stdout = execSync(`node ${BIN} -p ${SCHEMA_PATH} --minify`).toString().trimEnd();
const stdout = execSync(`npx ts-json-schema-generator -p ${SCHEMA_PATH} --minify`).toString().trimEnd();

// Only a newline at the end
expect(stdout.split("\n").length).toBe(1);
Expand All @@ -35,7 +34,7 @@ describe("Tests --minify output", () => {
});

it("Without minify", () => {
const stdout = execSync(`node ${BIN} -p ${SCHEMA_PATH}`).toString().trimEnd();
const stdout = execSync(`npx ts-json-schema-generator -p ${SCHEMA_PATH}`).toString().trimEnd();

// There's more than one \n (formatting)
expect(stdout.split("\n").length).toBeGreaterThan(2);
Expand Down

0 comments on commit 54e4366

Please sign in to comment.