Remove unused function

This commit is contained in:
Han Yeong-woo 2023-09-02 06:35:04 +09:00
parent a009342d77
commit 868dbd9a40
No known key found for this signature in database
GPG key ID: A46E340CB4E4D6AD
2 changed files with 0 additions and 18 deletions

View file

@ -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");

View file

@ -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.
*/