first commit

This commit is contained in:
2026-07-12 15:55:18 +05:30
commit ee98026cc5
404 changed files with 44522 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
import { expect, test } from "bun:test";
import { mkdirSync, mkdtempSync, writeFileSync } from "node:fs";
import { tmpdir } from "node:os";
import { join } from "node:path";
import { inspectProject } from "../src/doctor.ts";
test("doctor reports a healthy minimal project", () => {
const root = mkdtempSync(join(tmpdir(), "wrnexus-doctor-"));
mkdirSync(join(root, "app", "pages"), { recursive: true });
writeFileSync(join(root, "package.json"), JSON.stringify({ name: "app" }));
writeFileSync(join(root, "wrnexus.config.ts"), "export default {};");
const checks = inspectProject(root);
expect(checks.every((check) => check.ok)).toBe(true);
});
test("doctor returns actionable missing-project checks", () => {
const root = mkdtempSync(join(tmpdir(), "wrnexus-doctor-"));
const checks = inspectProject(root);
expect(checks.find((check) => check.name === "package.json")?.ok).toBe(false);
expect(checks.find((check) => check.name === "app/pages")?.detail).toBe("Create app/pages");
});