tangled
alpha
login
or
join now
tylur.dev
/
prototypey
prototypey.org - atproto lexicon typescript toolkit - mirror https://github.com/tylersayshi/prototypey
1
fork
atom
overview
issues
pulls
pipelines
fix cli test
Tyler
3 months ago
7b2d153f
7b8137e9
+7
-1
1 changed file
expand all
collapse all
unified
split
packages
cli
tests
integration
cli.test.ts
+7
-1
packages/cli/tests/integration/cli.test.ts
···
1
1
import { expect, test, describe } from "vitest";
2
2
+
import { readFileSync } from "node:fs";
3
3
+
import { resolve } from "node:path";
2
4
import { runCLI } from "../test-utils.js";
5
5
+
6
6
+
const pkg = JSON.parse(
7
7
+
readFileSync(resolve(__dirname, "../../package.json"), "utf-8"),
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
15
-
expect(stdout).toContain("prototypey, 0.0.0");
21
21
+
expect(stdout).toContain(`prototypey, ${pkg.version}`);
16
22
});
17
23
18
24
test("shows help for gen-inferred command", async () => {