From 868dbd9a405b11db2319d127efd2d13cfb8e6621 Mon Sep 17 00:00:00 2001 From: Han Yeong-woo Date: Sat, 2 Sep 2023 06:35:04 +0900 Subject: [PATCH] Remove unused function --- src/utils.test.ts | 14 -------------- src/utils.ts | 4 ---- 2 files changed, 18 deletions(-) diff --git a/src/utils.test.ts b/src/utils.test.ts index e7c8c9c..812e2c8 100644 --- a/src/utils.test.ts +++ b/src/utils.test.ts @@ -3,24 +3,10 @@ import { describe, expect, test } from "vitest"; import { checkWorkingDirectory, detectPackageManager, - getNpxCmd, isValidPackageManager, semverCompare, } from "./utils"; -test("getNpxCmd ", async () => { - process.env.RUNNER_OS = "Windows"; - expect(getNpxCmd()).toBe("npx.cmd"); - - process.env.RUNNER_OS = "Mac"; - expect(getNpxCmd()).toBe("npx"); - - process.env.RUNNER_OS = "Linux"; - expect(getNpxCmd()).toBe("npx"); - - delete process.env.RUNNER_OS; -}); - describe("semverCompare", () => { test("should return false if the second argument is equal to the first argument", () => { const isVersion1LessThanVersion2 = semverCompare("1.2.3", "1.2.3"); diff --git a/src/utils.ts b/src/utils.ts index 9ba5ab3..c644425 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -1,10 +1,6 @@ import { existsSync } from "node:fs"; import * as path from "node:path"; -export function getNpxCmd() { - return process.env.RUNNER_OS === "Windows" ? "npx.cmd" : "npx"; -} - /** * A helper function to compare two semver versions. If the second arg is greater than the first arg, it returns true. */