test: dedupe and optimize test suites

This commit is contained in:
Peter Steinberger
2026-02-19 15:18:50 +00:00
parent b0e55283d5
commit a1cb700a05
80 changed files with 2627 additions and 2962 deletions

View File

@@ -1,4 +1,5 @@
import path from "node:path";
import { Command } from "commander";
import { beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
const copyToClipboard = vi.fn();
@@ -117,7 +118,6 @@ beforeEach(() => {
runtime.log.mockReset();
runtime.error.mockReset();
runtime.exit.mockReset();
vi.clearAllMocks();
});
function writeManifest(dir: string) {
@@ -177,8 +177,6 @@ describe("browser extension install (fs-mocked)", () => {
const dir = path.join(tmp, "browser", "chrome-extension");
writeManifest(dir);
const { Command } = await import("commander");
const program = new Command();
const browser = program.command("browser").option("--json", "JSON output", false);
registerBrowserExtensionCommands(