mirror of
https://github.com/bendtherules/opencode-multi-model.git
synced 2026-08-18 13:42:21 +00:00
fix: Fix biome correctness errors
This commit is contained in:
+3
-21
@@ -10,24 +10,6 @@ import {
|
||||
import * as fs from "node:fs";
|
||||
import * as os from "node:os";
|
||||
import { openMultiModel } from "../src/core/open";
|
||||
import {
|
||||
createWindowBaseName,
|
||||
createWindowPlans,
|
||||
findDuplicates,
|
||||
formatInvalidModelError,
|
||||
getBinaryName,
|
||||
getSessionPath,
|
||||
getWorktreePath,
|
||||
getWorktreesForSession,
|
||||
launchModelInWindow,
|
||||
levenshtein,
|
||||
normalizeModels,
|
||||
runCommand,
|
||||
sanitizeName,
|
||||
shellQuote,
|
||||
suggestModels,
|
||||
undoWorktree,
|
||||
} from "../src/core/utils";
|
||||
|
||||
const originalBun$: typeof Bun.$ = (globalThis as any).Bun?.$;
|
||||
let mockCommandResponses: Record<
|
||||
@@ -37,7 +19,7 @@ let mockCommandResponses: Record<
|
||||
let executedCommands: string[] = [];
|
||||
|
||||
function setupMockBun$() {
|
||||
const mockFn = mock((strings: TemplateStringsArray, ...values: any[]) => {
|
||||
const mockFn = mock((_strings: TemplateStringsArray, ...values: any[]) => {
|
||||
const parts = values[0] as string[];
|
||||
const commandSignature = parts.join(" ");
|
||||
|
||||
@@ -71,12 +53,12 @@ function restoreOriginalBun$() {
|
||||
|
||||
describe("multi-model launch", () => {
|
||||
let existsSyncMock: ReturnType<typeof spyOn>;
|
||||
let bunMock: ReturnType<typeof setupMockBun$>;
|
||||
let _bunMock: ReturnType<typeof setupMockBun$>;
|
||||
|
||||
beforeEach(() => {
|
||||
spyOn(os, "homedir").mockReturnValue("/mock/home");
|
||||
existsSyncMock = spyOn(fs, "existsSync").mockReturnValue(false);
|
||||
bunMock = setupMockBun$();
|
||||
_bunMock = setupMockBun$();
|
||||
executedCommands = [];
|
||||
|
||||
mockCommandResponses = {
|
||||
|
||||
Reference in New Issue
Block a user