Skip to content

Commit b8f6c8c

Browse files
committed
fix(friendli): replace 'as any' with Record<string, unknown> in tests
CI eslint enforces @typescript-eslint/no-explicit-any; local run was a turbo cache hit so it slipped through.
1 parent a66aab1 commit b8f6c8c

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

src/api/providers/__tests__/friendli.spec.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ describe("FriendliHandler — Friendli-specific reasoning params", () => {
456456

457457
await handler.createMessage("system", []).next()
458458

459-
const callArgs = mockCreate.mock.calls[0][0] as any
459+
const callArgs = mockCreate.mock.calls[0][0] as Record<string, unknown>
460460
expect(callArgs.reasoning_effort).toBeUndefined()
461461
expect(callArgs.chat_template_kwargs).toEqual({ enable_thinking: false })
462462
expect(callArgs.parse_reasoning).toBeUndefined()
@@ -481,7 +481,7 @@ describe("FriendliHandler — Friendli-specific reasoning params", () => {
481481

482482
await handler.createMessage("system", []).next()
483483

484-
const callArgs = mockCreate.mock.calls[0][0] as any
484+
const callArgs = mockCreate.mock.calls[0][0] as Record<string, unknown>
485485
expect(callArgs.reasoning_effort).toBeUndefined()
486486
expect(callArgs.chat_template_kwargs).toEqual({ enable_thinking: false })
487487
expect(callArgs.parse_reasoning).toBeUndefined()
@@ -506,7 +506,7 @@ describe("FriendliHandler — Friendli-specific reasoning params", () => {
506506

507507
await handler.createMessage("system", []).next()
508508

509-
const callArgs = mockCreate.mock.calls[0][0] as any
509+
const callArgs = mockCreate.mock.calls[0][0] as Record<string, unknown>
510510
expect(callArgs.reasoning_effort).toBeUndefined()
511511
expect(callArgs.chat_template_kwargs).toEqual({ enable_thinking: false })
512512
expect(callArgs.parse_reasoning).toBeUndefined()
@@ -530,7 +530,7 @@ describe("FriendliHandler — Friendli-specific reasoning params", () => {
530530

531531
await handler.createMessage("system", []).next()
532532

533-
const callArgs = mockCreate.mock.calls[0][0] as any
533+
const callArgs = mockCreate.mock.calls[0][0] as Record<string, unknown>
534534
expect(callArgs.reasoning_effort).toBe("high")
535535
expect(callArgs.chat_template_kwargs).toEqual({ enable_thinking: true })
536536
expect(callArgs.parse_reasoning).toBe(true)
@@ -555,7 +555,7 @@ describe("FriendliHandler — Friendli-specific reasoning params", () => {
555555

556556
await handler.createMessage("system", []).next()
557557

558-
const callArgs = mockCreate.mock.calls[0][0] as any
558+
const callArgs = mockCreate.mock.calls[0][0] as Record<string, unknown>
559559
expect(callArgs.reasoning_effort).toBeUndefined()
560560
expect(callArgs.chat_template_kwargs).toBeUndefined()
561561
expect(callArgs.parse_reasoning).toBeUndefined()
@@ -610,7 +610,7 @@ describe("FriendliHandler — Friendli-specific reasoning params", () => {
610610

611611
await handler.completePrompt("test")
612612

613-
const callArgs = mockCreate.mock.calls[0][0] as any
613+
const callArgs = mockCreate.mock.calls[0][0] as Record<string, unknown>
614614
expect(callArgs.reasoning_effort).toBe("medium")
615615
expect(callArgs.chat_template_kwargs).toEqual({ enable_thinking: true })
616616
expect(callArgs.parse_reasoning).toBe(true)

0 commit comments

Comments
 (0)