Files
pi-goals/test/package.test.ts
T

15 lines
699 B
TypeScript

import { existsSync, readFileSync } from "node:fs";
import { resolve } from "node:path";
import { expect, it } from "vitest";
it("declares current entry and bundled extension resources that exist after install", () => {
const manifest = JSON.parse(readFileSync("package.json", "utf8"));
expect(manifest.pi.extensions[0]).toBe("./src/index.ts");
for (const path of manifest.pi.extensions) expect(existsSync(resolve(path)), path).toBe(true);
for (const name of ["pi-subagents", "pi-intercom", "pi-schedule-prompt"]) {
expect(manifest.dependencies[name]).toBeTruthy();
expect(manifest.bundledDependencies).toContain(name);
}
expect(manifest.dependencies["pi-subagents"]).toBe("0.66.0");
});