fix: Fix biome correctness errors

This commit is contained in:
2026-03-23 08:32:30 +05:30
parent 7a164c705c
commit 36c6700437
8 changed files with 24 additions and 40 deletions
+9 -5
View File
@@ -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() {