mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-10-10 03:28:03 +00:00
test: Update marketplace setting check tests
- Add getStateToPostToWebview mock to provider - Fix test expectations for new marketplace state caching
This commit is contained in:
parent
aeb81e9e49
commit
1a5ed11db7
1 changed files with 10 additions and 0 deletions
|
|
@ -18,6 +18,7 @@ jest.mock("vscode", () => ({
|
|||
const mockProvider = {
|
||||
getState: jest.fn(),
|
||||
postStateToWebview: jest.fn(),
|
||||
getStateToPostToWebview: jest.fn(),
|
||||
} as any
|
||||
|
||||
const mockMarketplaceManager = {
|
||||
|
|
@ -34,6 +35,9 @@ describe("Marketplace Setting Check", () => {
|
|||
mockProvider.getState.mockResolvedValue({
|
||||
experiments: { marketplace: false },
|
||||
})
|
||||
mockProvider.getStateToPostToWebview.mockResolvedValue({
|
||||
marketplaceEnabled: false,
|
||||
})
|
||||
|
||||
const message = {
|
||||
type: "filterMarketplaceItems" as const,
|
||||
|
|
@ -52,6 +56,9 @@ describe("Marketplace Setting Check", () => {
|
|||
mockProvider.getState.mockResolvedValue({
|
||||
experiments: { marketplace: true },
|
||||
})
|
||||
mockProvider.getStateToPostToWebview.mockResolvedValue({
|
||||
marketplaceEnabled: true,
|
||||
})
|
||||
|
||||
const message = {
|
||||
type: "filterMarketplaceItems" as const,
|
||||
|
|
@ -74,6 +81,9 @@ describe("Marketplace Setting Check", () => {
|
|||
mockProvider.getState.mockResolvedValue({
|
||||
experiments: { marketplace: false },
|
||||
})
|
||||
mockProvider.getStateToPostToWebview.mockResolvedValue({
|
||||
marketplaceEnabled: false,
|
||||
})
|
||||
|
||||
const mockInstallMarketplaceItem = jest.fn()
|
||||
const mockMarketplaceManagerWithInstall = {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue