-
Notifications
You must be signed in to change notification settings - Fork 34.4k
(test): fix glob mode match and remove duplicate loader.js in renderer.html #183507
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
// During unit testing, it may be empty and needs. | ||
viewDescriptorService.getDefaultViewContainer(ViewContainerLocation.Sidebar)?.id || '', |
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.
Why is this needed? Are any tests currently failing because of this?
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.
Why is this needed? Are any tests currently failing because of this?
Now the existing unit tests in VS Code are not executed into the SidebarPart constructor, so this writing (use !
rather than ?
) does not cause unit test execution to fail. The reason I encountered unit test failure is that I did not use TestSidebarPart , but directly use SidebarPart.
this.parts.set(ViewContainerLocation.Sidebar, new TestSideBarPart()); |
When I need to initialize SidebarPart, it will report an error because I haven't registered any other views at the time of unit testing.
Another reason is that other modules are fetched using optional chain processing, because there is no guarantee that there will be a default view container.
.describe('build', 'run with build output (out-build)').boolean('build') | ||
.describe('run', 'only run tests matching <relative_file_path>').string('run') | ||
.describe('glob', 'only run tests matching <pattern>').string('glob') |
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.
This should be runGlob
to match our other unit test types, and be described as "only run test files matching..."
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.
This should be
runGlob
to match our other unit test types, and be described as "only run test files matching..."
emmmm, but in
Line 24 in 89db3e4
- to run only a subset of tests use the `--run` or `--glob` options |
vscode/test/unit/browser/index.js
Line 84 in 89db3e4
// glob patterns (--glob) |
--glob
. Has it been abandoned?
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.
It looks like in the electron test we allow both glob
and runGlob
, so I guess that's fine. I would add a similar .alias('glob', 'runGlob')
just for consistency's sake
Head branch was pushed to by a user without write access
40181e3
to
34f628c
Compare
has been merged the latest code from main, Can you help me look at the code again when you are free? @roblourens @connor4312 |
These files were reworked recently, I reapplied the necessary change in #199979 |
Close #183506