Files
united-workforce/packages/agent-hermes/__tests__/issue-551.test.ts
T
xiaoju 8cb74672bc
CI / check (pull_request) Failing after 12s
fix: resolve remaining agent-hermes test failures
- Update issue-551 test: assert bun engines removed (not present)
- Migrate session-detail tests from bun:sqlite to better-sqlite3 API
  (db.exec for DDL, db.prepare().run() for inserts)

Refs #26
2026-06-03 14:39:20 +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 bun 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 bun")).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/);
});
});