Spaces:
Paused
Paused
Download client/modules/appInfo.test.ts from Nymbo/MiniSearch: direct link, hf CLI and curl.
- Browser
- Download file 603 Bytes
-
https://huggingface.co/spaces/Nymbo/MiniSearch/resolve/main/client/modules/appInfo.test.ts
- Command line
-
hf download hf://spaces/Nymbo/MiniSearch/client/modules/appInfo.test.ts
-
curl -L -o appInfo.test.ts https://huggingface.co/spaces/Nymbo/MiniSearch/resolve/main/client/modules/appInfo.test.ts
603 Bytes
| import { describe, expect, it } from "vitest"; | |
| import { appVersion } from "@/modules/appInfo"; | |
| describe("appVersion", () => { | |
| it("appends the commit hash as semver build metadata when the build had one", () => { | |
| // vitest.config.ts defines VITE_COMMIT_SHORT_HASH as "test-hash". | |
| expect(appVersion).toMatch(/^\d{4}\.\d{1,2}\.\d{1,2}\+test-hash$/); | |
| }); | |
| it("never leaves a dangling separator", () => { | |
| // A build context without a usable git repository yields an empty hash, and | |
| // "1.2.3+" is not a valid version string. | |
| expect(appVersion.endsWith("+")).toBe(false); | |
| }); | |
| }); | |