Files
united-workforce/packages/agent-hermes/__tests__/issue-551.test.ts
T
xiaoju fd33bf5ee1
CI / check (pull_request) Failing after 3m59s
fix: address PR review — await store.cas.put + bun shebang → node
- Add missing await on store.cas.put() in run.ts:192
- Replace #!/usr/bin/env bun → #!/usr/bin/env node in all CLI bins
- Update issue-551 test to assert node shebang
2026-06-03 14:58:23 +00:00

29 lines
1.1 KiB
TypeScript

import { describe, expect, test } from 'vitest';
import { dirname } from 'node:path';
import { fileURLToPath } from 'node:url';
import { readFileSync } from "node:fs";
import { join } from "node:path";
const PKG_ROOT = join(dirname(fileURLToPath(import.meta.url)), "..");
describe("Issue #551 — bin entry & engines", () => {
test("package.json no longer declares bun in engines", () => {
const pkg = JSON.parse(readFileSync(join(PKG_ROOT, "package.json"), "utf-8"));
expect(pkg.engines?.bun).toBeUndefined();
});
test("bin entry file has node shebang", () => {
const pkg = JSON.parse(readFileSync(join(PKG_ROOT, "package.json"), "utf-8"));
const binPath = pkg.bin["uwf-hermes"];
const content = readFileSync(join(PKG_ROOT, binPath), "utf-8");
expect(content.startsWith("#!/usr/bin/env node")).toBe(true);
});
test("README.md explains uwf-hermes is an adapter", () => {
const readme = readFileSync(join(PKG_ROOT, "README.md"), "utf-8");
expect(readme.toLowerCase()).toContain("adapter");
expect(readme).toMatch(/uwf-hermes/);
expect(readme).toMatch(/hermes/);
});
});