test(bin): batch 32 (4 files)

This commit is contained in:
YeonGyu-Kim
2026-05-30 19:12:05 +09:00
parent ae6ef6023c
commit 6e110c222c
4 changed files with 90 additions and 3 deletions
+41 -1
View File
@@ -1,6 +1,46 @@
// bin/platform.test.ts
import { describe, expect, test } from "bun:test";
import { getBinaryPath, getPlatformPackage, getPlatformPackageCandidates } from "./platform.js";
import {
getBinaryPath,
getPlatformPackage,
getPlatformPackageCandidates,
resolvePlatformPackageBaseName,
} from "./platform.js";
describe("resolvePlatformPackageBaseName", () => {
test("maps lazycodex wrapper to oh-my-opencode platform package family", () => {
// #given
const wrapperPackageName = "lazycodex";
// #when
const resolvedPlatformBase = resolvePlatformPackageBaseName(wrapperPackageName);
// #then
expect(resolvedPlatformBase).toBe("oh-my-opencode");
});
test("keeps oh-my-opencode wrapper mapped to oh-my-opencode platform package family", () => {
// #given
const wrapperPackageName = "oh-my-opencode";
// #when
const resolvedPlatformBase = resolvePlatformPackageBaseName(wrapperPackageName);
// #then
expect(resolvedPlatformBase).toBe("oh-my-opencode");
});
test("keeps oh-my-openagent wrapper mapped to oh-my-openagent platform package family", () => {
// #given
const wrapperPackageName = "oh-my-openagent";
// #when
const resolvedPlatformBase = resolvePlatformPackageBaseName(wrapperPackageName);
// #then
expect(resolvedPlatformBase).toBe("oh-my-openagent");
});
});
describe("getPlatformPackage", () => {
// #region Darwin platforms