diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4cea268e5..8584a5d1f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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 diff --git a/test/minify/index.test.ts b/test/minify/index.test.ts index d9be571f1..7f6d379ac 100644 --- a/test/minify/index.test.ts +++ b/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 = { @@ -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); @@ -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);