mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-06 08:18:39 +00:00
fix(tests): add getState() mock to requestOpenAiCodexRateLimits tests
The tests were failing when run in isolation due to missing getState() mock with currentApiConfigName and listApiConfigMeta properties. Added the mock to the beforeEach block similar to other describe blocks in the file.
This commit is contained in:
parent
11cddf8bd2
commit
65a15d54e4
1 changed files with 4 additions and 0 deletions
|
|
@ -599,6 +599,10 @@ describe("webviewMessageHandler - requestRouterModels", () => {
|
|||
describe("webviewMessageHandler - requestOpenAiCodexRateLimits", () => {
|
||||
beforeEach(() => {
|
||||
vi.clearAllMocks()
|
||||
mockClineProvider.getState = vi.fn().mockResolvedValue({
|
||||
currentApiConfigName: "test-profile",
|
||||
listApiConfigMeta: [{ id: "test-profile-id", name: "test-profile" }],
|
||||
})
|
||||
mockGetAccessToken.mockResolvedValue(null)
|
||||
mockGetAccountId.mockResolvedValue(null)
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue