chore: migrate to oxlint and oxfmt
Co-authored-by: Christoph Nakazawa <christoph.pojer@gmail.com>
This commit is contained in:
@@ -17,24 +17,15 @@ describe("runtime-guard", () => {
|
||||
});
|
||||
|
||||
it("compares versions correctly", () => {
|
||||
expect(
|
||||
isAtLeast(
|
||||
{ major: 22, minor: 0, patch: 0 },
|
||||
{ major: 22, minor: 0, patch: 0 },
|
||||
),
|
||||
).toBe(true);
|
||||
expect(
|
||||
isAtLeast(
|
||||
{ major: 22, minor: 1, patch: 0 },
|
||||
{ major: 22, minor: 0, patch: 0 },
|
||||
),
|
||||
).toBe(true);
|
||||
expect(
|
||||
isAtLeast(
|
||||
{ major: 21, minor: 9, patch: 0 },
|
||||
{ major: 22, minor: 0, patch: 0 },
|
||||
),
|
||||
).toBe(false);
|
||||
expect(isAtLeast({ major: 22, minor: 0, patch: 0 }, { major: 22, minor: 0, patch: 0 })).toBe(
|
||||
true,
|
||||
);
|
||||
expect(isAtLeast({ major: 22, minor: 1, patch: 0 }, { major: 22, minor: 0, patch: 0 })).toBe(
|
||||
true,
|
||||
);
|
||||
expect(isAtLeast({ major: 21, minor: 9, patch: 0 }, { major: 22, minor: 0, patch: 0 })).toBe(
|
||||
false,
|
||||
);
|
||||
});
|
||||
|
||||
it("validates runtime thresholds", () => {
|
||||
@@ -71,9 +62,7 @@ describe("runtime-guard", () => {
|
||||
pathEnv: "/usr/bin",
|
||||
};
|
||||
expect(() => assertSupportedRuntime(runtime, details)).toThrow("exit");
|
||||
expect(runtime.error).toHaveBeenCalledWith(
|
||||
expect.stringContaining("requires Node"),
|
||||
);
|
||||
expect(runtime.error).toHaveBeenCalledWith(expect.stringContaining("requires Node"));
|
||||
});
|
||||
|
||||
it("returns silently when runtime meets requirements", () => {
|
||||
|
||||
Reference in New Issue
Block a user