Skip to content

Commit cb71967

Browse files
test(webview): drop unused scaffolding from the context spec
ExtensionMessage, expectMessages and cacheFor are declared but never used in this unit's slice of ExtensionStateContext.spec.tsx, so eslint reports all three as no-unused-vars errors and the compile job's `pnpm lint` step fails. They belong to the intern-cache helpers carried by another unit's slice, so they are removed here rather than renamed with a leading underscore or suppressed. Locally verified in this worktree: prettier and eslint clean, the spec runs green, and `pnpm check-types`, `pnpm lint` and `pnpm knip` pass. Committed with --no-verify (husky/lint-staged cannot run in these worktrees); prettier, eslint and the touched vitest specs were run by hand.
1 parent b977ee4 commit cb71967

1 file changed

Lines changed: 0 additions & 16 deletions

File tree

‎webview-ui/src/context/__tests__/ExtensionStateContext.spec.tsx‎

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { providerIdentifiers } from "@roo-code/types"
2-
import { StringCache } from "@src/utils/stringCache"
32
import { render, screen, act } from "@/utils/test-utils"
43
import React from "react"
54

@@ -8,7 +7,6 @@ import {
87
type ExperimentId,
98
type ExtensionState,
109
type ClineMessage,
11-
type ExtensionMessage,
1210
type MarketplaceItem,
1311
type MarketplaceInstalledMetadata,
1412
type RouterModels,
@@ -64,20 +62,6 @@ const TestComponent = () => {
6462
)
6563
}
6664

67-
const expectMessages = (messages: ClineMessage[]) => {
68-
expect(JSON.parse(screen.getByTestId("cline-messages").textContent!)).toEqual(messages)
69-
}
70-
71-
type InternSpy = { mock: { contexts: readonly unknown[] } }
72-
73-
const cacheFor = (spy: InternSpy, kind: "message" | "history"): StringCache => {
74-
const cache = spy.mock.contexts.find(
75-
(value) => value instanceof StringCache && (value["shouldIntern"] !== undefined) === (kind === "message"),
76-
)
77-
if (!(cache instanceof StringCache)) throw new Error(`Missing ${kind} cache`)
78-
return cache
79-
}
80-
8165
const RulesTestComponent = () => {
8266
const { rules } = useExtensionState()
8367

0 commit comments

Comments
 (0)