AI scaffolded NodeJS version of the App.
This commit is contained in:
14
app-new/backend/test/version.test.ts
Normal file
14
app-new/backend/test/version.test.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { sortImageVersionsIfSemantic } from "../src/version";
|
||||
|
||||
describe("sortImageVersionsIfSemantic", () => {
|
||||
it("sorts only semantic versions", () => {
|
||||
const sorted = sortImageVersionsIfSemantic(["1.10.0", "1.2.0", "2.0.0"]);
|
||||
expect(sorted).toEqual(["1.2.0", "1.10.0", "2.0.0"]);
|
||||
});
|
||||
|
||||
it("returns source order for non-semantic versions", () => {
|
||||
const original = ["latest", "1.0.0", "beta"];
|
||||
expect(sortImageVersionsIfSemantic(original)).toEqual(original);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user