style(cli): apply biome formatting to test files
CI / check (pull_request) Successful in 45s

Fix import ordering and formatting in test files to pass biome checks.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-28 10:20:53 +00:00
parent 12343b05ae
commit a894a1642b
3 changed files with 36 additions and 32 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
import { describe, it, expect } from "vitest";
import { readFile, access } from "node:fs/promises";
import { access, readFile } from "node:fs/promises";
import { join } from "node:path";
import { describe, expect, it } from "vitest";
const CLI_DIR = join(import.meta.dirname, "..");
+1 -1
View File
@@ -1,4 +1,4 @@
import { describe, it, expect } from "vitest";
import { describe, expect, it } from "vitest";
describe("uconn Type Safety Tests", () => {
it("should have proper type annotations for all variables", () => {
+33 -29
View File
@@ -1,8 +1,8 @@
import { describe, it, expect, beforeEach, afterEach } from "vitest";
import { spawn } from "node:child_process";
import { readFile, readdir, rm } from "node:fs/promises";
import { homedir } from "node:os";
import { join } from "node:path";
import { afterEach, beforeEach, describe, expect, it } from "vitest";
const RECORDS_DIR = join(homedir(), ".uwf-dashboard/records");
const UREC_PATH = join(import.meta.dirname, "../dist/urec.js");
@@ -55,21 +55,23 @@ describe("urec Functional Behavior Tests", () => {
});
it("should execute basic command and create record", async () => {
const result = await new Promise<{ stdout: string; stderr: string; exitCode: number | null }>((resolve) => {
const proc = spawn("node", [UREC_PATH, "echo", "test"]);
let stdout = "";
let stderr = "";
const result = await new Promise<{ stdout: string; stderr: string; exitCode: number | null }>(
(resolve) => {
const proc = spawn("node", [UREC_PATH, "echo", "test"]);
let stdout = "";
let stderr = "";
proc.stdout?.on("data", (d) => {
stdout += d.toString();
});
proc.stderr?.on("data", (d) => {
stderr += d.toString();
});
proc.on("close", (exitCode) => {
resolve({ stdout, stderr, exitCode });
});
});
proc.stdout?.on("data", (d) => {
stdout += d.toString();
});
proc.stderr?.on("data", (d) => {
stderr += d.toString();
});
proc.on("close", (exitCode) => {
resolve({ stdout, stderr, exitCode });
});
},
);
expect(result.exitCode).toBe(0);
expect(result.stdout).toContain("test");
@@ -97,21 +99,23 @@ describe("urec Functional Behavior Tests", () => {
}, 10000);
it("should capture stderr", async () => {
const result = await new Promise<{ stdout: string; stderr: string; exitCode: number | null }>((resolve) => {
const proc = spawn("node", [UREC_PATH, "node", "-e", "console.error('error message')"]);
let stdout = "";
let stderr = "";
const result = await new Promise<{ stdout: string; stderr: string; exitCode: number | null }>(
(resolve) => {
const proc = spawn("node", [UREC_PATH, "node", "-e", "console.error('error message')"]);
let stdout = "";
let stderr = "";
proc.stdout?.on("data", (d) => {
stdout += d.toString();
});
proc.stderr?.on("data", (d) => {
stderr += d.toString();
});
proc.on("close", (exitCode) => {
resolve({ stdout, stderr, exitCode });
});
});
proc.stdout?.on("data", (d) => {
stdout += d.toString();
});
proc.stderr?.on("data", (d) => {
stderr += d.toString();
});
proc.on("close", (exitCode) => {
resolve({ stdout, stderr, exitCode });
});
},
);
expect(result.stderr).toContain("error message");