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:
+9
-5
@@ -19,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(" ");
|
||||
executedCommands.push(commandSignature);
|
||||
@@ -47,11 +47,11 @@ function restoreOriginalBun$() {
|
||||
}
|
||||
|
||||
describe("closeMultiModel", () => {
|
||||
let bunMock: ReturnType<typeof setupMockBun$>;
|
||||
let _bunMock: ReturnType<typeof setupMockBun$>;
|
||||
|
||||
beforeEach(() => {
|
||||
spyOn(os, "homedir").mockReturnValue("/home/user");
|
||||
bunMock = setupMockBun$();
|
||||
_bunMock = setupMockBun$();
|
||||
executedCommands = [];
|
||||
mockCommandResponses = {};
|
||||
});
|
||||
@@ -153,6 +153,7 @@ describe("closeMultiModel", () => {
|
||||
global.Date = class extends OriginalDate {
|
||||
constructor() {
|
||||
super();
|
||||
// biome-ignore lint/correctness/noConstructorReturn: time-mocking required
|
||||
return fixedDate;
|
||||
}
|
||||
toISOString() {
|
||||
@@ -201,7 +202,7 @@ describe("closeMultiModel", () => {
|
||||
|
||||
// Stub readline to return "n"
|
||||
const mockInterface = {
|
||||
question: (q: string, cb: (a: string) => void) => cb("n"),
|
||||
question: (_q: string, cb: (a: string) => void) => cb("n"),
|
||||
close: () => {},
|
||||
} as any;
|
||||
spyOn(readline, "createInterface").mockImplementation(() => mockInterface);
|
||||
@@ -232,7 +233,7 @@ describe("closeMultiModel", () => {
|
||||
|
||||
// Stub readline to simulate user confirming cleanup (answers "y")
|
||||
const mockInterface = {
|
||||
question: (q: string, cb: (a: string) => void) => cb("y"),
|
||||
question: (_q: string, cb: (a: string) => void) => cb("y"),
|
||||
close: () => {},
|
||||
} as any;
|
||||
spyOn(readline, "createInterface").mockImplementation(() => mockInterface);
|
||||
@@ -244,6 +245,7 @@ describe("closeMultiModel", () => {
|
||||
global.Date = class extends OriginalDate {
|
||||
constructor() {
|
||||
super();
|
||||
// biome-ignore lint/correctness/noConstructorReturn: time-mocking required
|
||||
return fixedDate;
|
||||
}
|
||||
toISOString() {
|
||||
@@ -310,6 +312,7 @@ describe("closeMultiModel", () => {
|
||||
global.Date = class extends OriginalDate {
|
||||
constructor() {
|
||||
super();
|
||||
// biome-ignore lint/correctness/noConstructorReturn: time-mocking required
|
||||
return fixedDate;
|
||||
}
|
||||
toISOString() {
|
||||
@@ -375,6 +378,7 @@ describe("closeMultiModel", () => {
|
||||
global.Date = class extends OriginalDate {
|
||||
constructor() {
|
||||
super();
|
||||
// biome-ignore lint/correctness/noConstructorReturn: time-mocking required
|
||||
return fixedDate;
|
||||
}
|
||||
toISOString() {
|
||||
|
||||
Reference in New Issue
Block a user