5f562cbc5a
- tsconfig: 启用 emit (rootDir/outDir/composite), 添加 project references - shebang: bun → node - bin: src/index.ts → dist/index.js - import.meta.dir → import.meta.dirname (去掉 Bun 专有 API) - prompts 目录移到包根, src/dist 路径统一 - 修复 exactOptionalPropertyTypes 类型错误 Fixes #58
20 lines
759 B
TypeScript
20 lines
759 B
TypeScript
import { describe, expect, test } from "bun:test";
|
|
import { readFileSync } from "node:fs";
|
|
import { join } from "node:path";
|
|
|
|
const usagePath = join(import.meta.dir, "..", "prompts", "usage.md");
|
|
|
|
describe("usage.md doc cleanup (D)", () => {
|
|
test("D3. usage.md does not reference legacy openStoreAndVarStore / createVariableStore", () => {
|
|
const content = readFileSync(usagePath, "utf8");
|
|
expect(content).not.toContain("openStoreAndVarStore");
|
|
expect(content).not.toContain("createVariableStore");
|
|
});
|
|
|
|
test("D1. usage.md references openStore returning Store", () => {
|
|
const content = readFileSync(usagePath, "utf8");
|
|
expect(content).toContain("openStore");
|
|
expect(content).toMatch(/store\.cas|store\.var|store\.tag/);
|
|
});
|
|
});
|