initial commit
This commit is contained in:
28
package-manifest.test.mjs
Normal file
28
package-manifest.test.mjs
Normal file
@@ -0,0 +1,28 @@
|
||||
import test from "node:test";
|
||||
import assert from "node:assert/strict";
|
||||
import { existsSync, readFileSync } from "node:fs";
|
||||
import { dirname, resolve } from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
|
||||
const packageRoot = dirname(fileURLToPath(import.meta.url));
|
||||
const pkg = JSON.parse(readFileSync(resolve(packageRoot, "package.json"), "utf8"));
|
||||
|
||||
test("package.json exposes pi-question as a standalone pi package", () => {
|
||||
assert.equal(pkg.name, "pi-question");
|
||||
assert.equal(pkg.type, "module");
|
||||
assert.ok(Array.isArray(pkg.keywords));
|
||||
assert.ok(pkg.keywords.includes("pi-package"));
|
||||
assert.deepEqual(pkg.pi, {
|
||||
extensions: ["./index.ts"],
|
||||
});
|
||||
|
||||
assert.equal(pkg.peerDependencies["@mariozechner/pi-coding-agent"], "*");
|
||||
assert.equal(pkg.peerDependencies["@mariozechner/pi-tui"], "*");
|
||||
assert.equal(pkg.peerDependencies["@sinclair/typebox"], "*");
|
||||
assert.deepEqual(pkg.dependencies ?? {}, {});
|
||||
assert.equal(pkg.bundledDependencies, undefined);
|
||||
assert.deepEqual(pkg.files, ["index.ts", "question-core.mjs"]);
|
||||
|
||||
assert.ok(existsSync(resolve(packageRoot, "index.ts")));
|
||||
assert.ok(existsSync(resolve(packageRoot, "question-core.mjs")));
|
||||
});
|
||||
Reference in New Issue
Block a user