prototypey.org - atproto lexicon typescript toolkit - mirror https://github.com/tylersayshi/prototypey

fix cli test

Tyler 7b2d153f 7b8137e9

+7 -1
+7 -1
packages/cli/tests/integration/cli.test.ts
··· 1 1 import { expect, test, describe } from "vitest"; 2 + import { readFileSync } from "node:fs"; 3 + import { resolve } from "node:path"; 2 4 import { runCLI } from "../test-utils.js"; 5 + 6 + const pkg = JSON.parse( 7 + readFileSync(resolve(__dirname, "../../package.json"), "utf-8"), 8 + ) as { version: string }; 3 9 4 10 describe("CLI Integration", () => { 5 11 test("shows error when called without arguments", async () => { ··· 12 18 test("shows version", async () => { 13 19 const { stdout, stderr } = await runCLI(["--version"]); 14 20 expect(stderr).toBe(""); 15 - expect(stdout).toContain("prototypey, 0.0.0"); 21 + expect(stdout).toContain(`prototypey, ${pkg.version}`); 16 22 }); 17 23 18 24 test("shows help for gen-inferred command", async () => {