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
import { expect, test, describe } from "vitest";
0
0
2
import { runCLI } from "../test-utils.js";
0
0
0
0
3
4
describe("CLI Integration", () => {
5
test("shows error when called without arguments", async () => {
···
12
test("shows version", async () => {
13
const { stdout, stderr } = await runCLI(["--version"]);
14
expect(stderr).toBe("");
15
-
expect(stdout).toContain("prototypey, 0.0.0");
16
});
17
18
test("shows help for gen-inferred command", async () => {
···
1
import { expect, test, describe } from "vitest";
2
+
import { readFileSync } from "node:fs";
3
+
import { resolve } from "node:path";
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 };
9
10
describe("CLI Integration", () => {
11
test("shows error when called without arguments", async () => {
···
18
test("shows version", async () => {
19
const { stdout, stderr } = await runCLI(["--version"]);
20
expect(stderr).toBe("");
21
+
expect(stdout).toContain(`prototypey, ${pkg.version}`);
22
});
23
24
test("shows help for gen-inferred command", async () => {