Skip to content

test(editor): add tests for multi workspace folder setup#10648

Closed
Sysix wants to merge 1 commit into04-20-feat_language_server_support_multiple_workspacesfrom
04-27-test_editor_add_tests_for_multi_root_workspaces
Closed

test(editor): add tests for multi workspace folder setup#10648
Sysix wants to merge 1 commit into04-20-feat_language_server_support_multiple_workspacesfrom
04-27-test_editor_add_tests_for_multi_root_workspaces

Conversation

@Sysix
Copy link
Member

@Sysix Sysix commented Apr 27, 2025

We have now 3 different test setups:

test()

Will be executed in both modes. Should be used to make sure this works for both ways.

testSingleFolderMode()

Will only be executed for single folders. Testing with multi folder is redundant.

testMultiFolderMode()

Will only be executed in multi folder mode. These are special tests which are only designed for multi folders and makes no sense that it will work in single folder.

Copy link
Member Author

Sysix commented Apr 27, 2025

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@Sysix Sysix force-pushed the 04-27-test_editor_add_tests_for_multi_root_workspaces branch from 44d4214 to 1bb9544 Compare April 27, 2025 18:48
@Sysix Sysix force-pushed the 04-20-feat_language_server_support_multiple_workspaces branch from 49202a7 to 0022bcc Compare April 28, 2025 10:19
@Sysix Sysix force-pushed the 04-27-test_editor_add_tests_for_multi_root_workspaces branch from 1bb9544 to 2f30901 Compare April 28, 2025 10:19
@Sysix Sysix force-pushed the 04-20-feat_language_server_support_multiple_workspaces branch from 0022bcc to cae8ea5 Compare April 28, 2025 11:15
@Sysix Sysix force-pushed the 04-27-test_editor_add_tests_for_multi_root_workspaces branch 2 times, most recently from 6a8687d to bfbffad Compare April 28, 2025 11:21
@Sysix Sysix force-pushed the 04-20-feat_language_server_support_multiple_workspaces branch from cae8ea5 to e52464a Compare April 28, 2025 11:21
@Sysix Sysix force-pushed the 04-27-test_editor_add_tests_for_multi_root_workspaces branch from bfbffad to 8822bad Compare April 28, 2025 11:28
@Sysix Sysix force-pushed the 04-20-feat_language_server_support_multiple_workspaces branch from e52464a to cfd7918 Compare April 28, 2025 13:50
@Sysix Sysix force-pushed the 04-27-test_editor_add_tests_for_multi_root_workspaces branch from 8822bad to 09224f8 Compare April 28, 2025 13:50
@Sysix Sysix force-pushed the 04-20-feat_language_server_support_multiple_workspaces branch from cfd7918 to f6c1f06 Compare April 28, 2025 14:48
@Sysix Sysix force-pushed the 04-27-test_editor_add_tests_for_multi_root_workspaces branch from 09224f8 to a7fd187 Compare April 28, 2025 14:48
@Sysix Sysix changed the title test(editor): add tests for multi root workspaces test(editor): add tests for multi workspace fodler setup Apr 28, 2025
@Sysix Sysix changed the title test(editor): add tests for multi workspace fodler setup test(editor): add tests for multi workspace folder setup Apr 28, 2025
@Sysix Sysix force-pushed the 04-27-test_editor_add_tests_for_multi_root_workspaces branch from a7fd187 to ed96883 Compare April 29, 2025 12:15
@Sysix Sysix force-pushed the 04-20-feat_language_server_support_multiple_workspaces branch from f6c1f06 to 05ed2c1 Compare April 29, 2025 12:15
@Sysix Sysix force-pushed the 04-27-test_editor_add_tests_for_multi_root_workspaces branch from ed96883 to 53dd21f Compare April 29, 2025 12:40
@Sysix Sysix force-pushed the 04-20-feat_language_server_support_multiple_workspaces branch 2 times, most recently from 6c24b23 to 74d4a12 Compare April 29, 2025 14:57
@Sysix Sysix force-pushed the 04-27-test_editor_add_tests_for_multi_root_workspaces branch from 53dd21f to 7153809 Compare April 29, 2025 14:57
@Sysix Sysix force-pushed the 04-20-feat_language_server_support_multiple_workspaces branch from 74d4a12 to 08c162b Compare April 29, 2025 15:20
@Sysix Sysix force-pushed the 04-27-test_editor_add_tests_for_multi_root_workspaces branch from 7153809 to 0302675 Compare April 29, 2025 15:20
@Sysix Sysix force-pushed the 04-27-test_editor_add_tests_for_multi_root_workspaces branch from 0302675 to 228d797 Compare April 29, 2025 17:18
@Sysix Sysix changed the base branch from 04-20-feat_language_server_support_multiple_workspaces to graphite-base/10648 April 29, 2025 17:26
@Sysix Sysix force-pushed the graphite-base/10648 branch from 08c162b to 01cc2e4 Compare April 29, 2025 17:46
@Sysix Sysix force-pushed the 04-27-test_editor_add_tests_for_multi_root_workspaces branch from 228d797 to a68d729 Compare April 29, 2025 17:46
@Sysix Sysix changed the base branch from graphite-base/10648 to 04-20-feat_language_server_support_multiple_workspaces April 29, 2025 17:46
@Sysix Sysix force-pushed the 04-27-test_editor_add_tests_for_multi_root_workspaces branch 6 times, most recently from af00107 to eb22bd5 Compare April 30, 2025 13:38
strictEqual(secondDiagnostics[0].severity, DiagnosticSeverity.Error);
})

test('cross module', async () => {
Copy link
Member Author

@Sysix Sysix Apr 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I needed to move the test to the end to work. I do not have an idea why, and it is already frustrating enough to create tests for vscode^^

strictEqual(folderDiagnostics[0].code.target.authority, 'oxc.rs');
strictEqual(folderDiagnostics[0].severity, DiagnosticSeverity.Warning);

workspace.updateWorkspaceFolders(workspace.workspaceFolders?.length ?? 0, 0, {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding folders only works when we have already a multi folder setup.
Adding a folder in single folder setup will restart the VSCode Window and makes some weird tests bugs

@Sysix Sysix force-pushed the 04-27-test_editor_add_tests_for_multi_root_workspaces branch from eb22bd5 to cde9ae1 Compare April 30, 2025 13:48
@Sysix Sysix marked this pull request as ready for review April 30, 2025 13:52
@Sysix Sysix closed this May 3, 2025
@Sysix Sysix reopened this May 8, 2025
@Sysix Sysix closed this May 8, 2025
@Sysix Sysix deleted the 04-27-test_editor_add_tests_for_multi_root_workspaces branch May 9, 2025 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-editor Area - Editor and Language Server C-test Category - Testing. Code is missing test cases, or a PR is adding them

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant