-
Notifications
You must be signed in to change notification settings - Fork 3.1k
chore: migrate core (autocomplete) tests to vitest #6063
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
Merged
tomasz-stefaniak
merged 18 commits into
continuedev:main
from
uinstinct:core-vitest/autocomplete
Jun 17, 2025
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
2e2c5eb
rename LocalPlatformClient.vitest.ts to .test.ts
uinstinct 577c1a8
add .global-setup and .setup files
uinstinct d2c99e5
test RootPathContextService
uinstinct 033577d
migrate generation tests
uinstinct 6f80d61
migrate snippet and util tests
uinstinct 68a9f37
migrate charStream and lineStream tests
uinstinct 41f6f50
migrate filter.test and add '.continueignore' to test dir
uinstinct 3cbeca0
ignore autocomplete dir from jest
uinstinct 9c438e6
configure files to be tested using vitest
uinstinct 4e0ca07
remove debug statement
uinstinct 0a4edcb
remove .only
uinstinct 52078bf
Merge branch 'main' into core-vitest/autocomplete
uinstinct 6cdefae
update tests
uinstinct 7f9d545
remove comments in vitest.setup
uinstinct 09e1eb9
include previous .vitest.ts files
uinstinct 03017ef
test only .vitest.ts files
uinstinct fce7a5d
rename all files to .vitest.ts
uinstinct 33d3f5a
jest only *.test.ts files
uinstinct File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
...ntext/test/RootPathContextService.test.ts → ...ext/test/RootPathContextService.vitest.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
...ering/streamTransforms/charStream.test.ts → ...ing/streamTransforms/charStream.vitest.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
...complete/util/completionTestUtils.test.ts → ...mplete/util/completionTestUtils.vitest.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
import { describe, expect, it } from "vitest"; | ||
import { | ||
processTestCase, | ||
type CompletionTestCase, | ||
|
1 change: 1 addition & 0 deletions
1
.../util/processSingleLineCompletion.test.ts → ...til/processSingleLineCompletion.vitest.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
vitest gets the actual
__dirname
where the file resides while for jest __dirname is equivalent process.cwd()for example, in this case, __dirname for vitest would be
/users/myuser/continue/core/autocomplete/context/root-path-context/test
and for jest it would be/users/myuser/continue/core
Hence used
process.cwd()