Skip to content

Commit 5ff1732

Browse files
committed
refactor: migrate test to vitest
1 parent c237b91 commit 5ff1732

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

webview-ui/src/components/marketplace/__tests__/MarketplaceViewStateManager.test.ts renamed to webview-ui/src/components/marketplace/__tests__/MarketplaceViewStateManager.spec.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ import { MarketplaceViewStateManager, ViewStateTransition } from "../Marketplace
22
import { MarketplaceItem } from "@roo-code/types"
33

44
// Mock vscode module
5-
jest.mock("@/utils/vscode", () => ({
5+
vi.mock("@/utils/vscode", () => ({
66
vscode: {
7-
postMessage: jest.fn(),
7+
postMessage: vi.fn(),
88
},
99
}))
1010

1111
describe("MarketplaceViewStateManager", () => {
1212
let stateManager: MarketplaceViewStateManager
13-
let mockStateChangeHandler: jest.Mock
13+
let mockStateChangeHandler: ReturnType<typeof vi.fn>
1414

1515
const mockMarketplaceItems: MarketplaceItem[] = [
1616
{
@@ -43,13 +43,13 @@ describe("MarketplaceViewStateManager", () => {
4343

4444
beforeEach(() => {
4545
stateManager = new MarketplaceViewStateManager()
46-
mockStateChangeHandler = jest.fn()
46+
mockStateChangeHandler = vi.fn()
4747
stateManager.onStateChange(mockStateChangeHandler)
4848
})
4949

5050
afterEach(() => {
5151
stateManager.cleanup()
52-
jest.clearAllMocks()
52+
vi.clearAllMocks()
5353
})
5454

5555
describe("initialization", () => {

0 commit comments

Comments
 (0)