test(editor): add tests for multi workspace folder setup#10648
Conversation
|
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.
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
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. |
44d4214 to
1bb9544
Compare
49202a7 to
0022bcc
Compare
1bb9544 to
2f30901
Compare
0022bcc to
cae8ea5
Compare
6a8687d to
bfbffad
Compare
cae8ea5 to
e52464a
Compare
bfbffad to
8822bad
Compare
e52464a to
cfd7918
Compare
8822bad to
09224f8
Compare
cfd7918 to
f6c1f06
Compare
09224f8 to
a7fd187
Compare
a7fd187 to
ed96883
Compare
f6c1f06 to
05ed2c1
Compare
ed96883 to
53dd21f
Compare
6c24b23 to
74d4a12
Compare
53dd21f to
7153809
Compare
74d4a12 to
08c162b
Compare
7153809 to
0302675
Compare
0302675 to
228d797
Compare
08c162b to
01cc2e4
Compare
228d797 to
a68d729
Compare
af00107 to
eb22bd5
Compare
| strictEqual(secondDiagnostics[0].severity, DiagnosticSeverity.Error); | ||
| }) | ||
|
|
||
| test('cross module', async () => { |
There was a problem hiding this comment.
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, { |
There was a problem hiding this comment.
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
eb22bd5 to
cde9ae1
Compare

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.