-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Convert jest tests to vitest and disable default watch mode for vitest #4568
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
|
For the glama spec I see output like that makes it look like it might be making a real request. I don't see that output in the jest version, but I'm not sure if that means:
|
Jest is suppressing this particular error, and we're not mocking it, but it is disallowed since we've configured nock for jest: https://github.com/RooCodeInc/Roo-Code/blob/main/src/__mocks__/jest.setup.ts#L3 We'll want to do the same for vitest; good catch. |
Description
This ports ~700 tests from jest to vitest. There are still 1,300 remaining. I can do another pass of the prompt and not tell Roo Code to give up so easily.
Roo Code prompt:
Important
Convert Jest tests to Vitest across multiple modules, updating mocks and configurations for compatibility.
openrouter.spec.ts,requesty.spec.ts,vertex.spec.ts,reasoning.spec.ts,vscode-lm-format.spec.ts,cache-strategy.spec.ts,diagnostics.spec.ts,line-counter.spec.ts,ShadowCheckpointService.spec.ts,excludes.spec.ts,openai-compatible.spec.ts,parser.spec.ts,scanner.spec.ts,qdrant-client.spec.ts,enhance-prompt.spec.ts,git.spec.ts,outputChannelLogger.spec.ts,xml.spec.ts,CompactLogger.spec.ts.jestwithvitestfor mocking and assertions.vitest.fn()andvitest.mock().vitest.config.tsto include setup files and disable watch mode.vitest-vscode-mock.jsto mock VSCode API for Vitest tests.vitest.config.tsto use the new VSCode mock file.This description was created by
for 7ab2027. You can customize this summary. It will automatically update as commits are pushed.