mirror of
https://github.com/cloudflare/wrangler-action.git
synced 2024-11-21 17:43:23 +01:00
Remove unused function
This commit is contained in:
parent
a009342d77
commit
868dbd9a40
2 changed files with 0 additions and 18 deletions
|
@ -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");
|
||||
|
|
|
@ -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.
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue