Download mobile/src/services/deployment/buildVersionCache.test.ts from Anirudh1950/MentraOS: direct link, hf CLI and curl.
- Browser
- Download file 1.01 kB
-
https://huggingface.co/Anirudh1950/MentraOS/resolve/main/mobile/src/services/deployment/buildVersionCache.test.ts
- Command line
-
hf download hf://Anirudh1950/MentraOS/mobile/src/services/deployment/buildVersionCache.test.ts
-
curl -L -o buildVersionCache.test.ts https://huggingface.co/Anirudh1950/MentraOS/resolve/main/mobile/src/services/deployment/buildVersionCache.test.ts
1.01 kB
| import {SETTINGS} from "@mentra/engine" | |
| it("keeps the mandatory version floor when upgrading an install without a build marker", async () => { | |
| const {storage} = jest.requireActual<typeof import("../../../modules/engine/src/utils/storage/storage")>( | |
| "../../../modules/engine/src/utils/storage/storage", | |
| ) | |
| const {useSettingsStore} = jest.requireActual<typeof import("../../../modules/engine/src/stores/settings")>( | |
| "../../../modules/engine/src/stores/settings", | |
| ) | |
| storage.remove("settings.lastBuildEnv") | |
| storage.save(SETTINGS.cached_required_version.key, "runtime:99.0.0") | |
| const loaded = await useSettingsStore.getState().loadAllSettings() | |
| if (loaded.is_error()) throw loaded.error | |
| expect(useSettingsStore.getState().getSetting(SETTINGS.cached_required_version.key)).toBe("runtime:99.0.0") | |
| const persisted = storage.load(SETTINGS.cached_required_version.key) | |
| if (persisted.is_error()) throw persisted.error | |
| expect(persisted.value).toBe("runtime:99.0.0") | |
| }) | |