Files
setup-uv/__tests__/download/checksum/known-version.test.ts
T
Kevin StillhammerandGitHub 18d451d679 Add latest-known version selector (#993)
## Summary

- add `latest-known` as an explicit version selector
- resolve it locally to the newest version in the bundled checksum table
- preserve existing default and `latest` behavior
- document custom-manifest checksum semantics and update published
bundles

## Testing

- `npm ci --ignore-scripts`
- `npm run all` (99 tests passed)

Closes #919

Refs: pi-session 019fed0e-6019-7504-911b-bd9955cbbd49
2026-08-11 11:15:59 +02:00

21 lines
555 B
TypeScript

import { expect, it, jest } from "@jest/globals";
jest.unstable_mockModule(
"../../../src/download/checksum/known-checksums",
() => ({
KNOWN_CHECKSUMS: {
"aarch64-apple-darwin-1.9.0": "checksum",
"x86_64-unknown-linux-gnu-1.8.0": "checksum",
"x86_64-unknown-linux-gnu-1.10.0": "checksum",
},
}),
);
const { getLatestKnownVersion } = await import(
"../../../src/download/checksum/known-version"
);
it("returns the highest version with a built-in checksum", () => {
expect(getLatestKnownVersion()).toBe("1.10.0");
});