-
Notifications
You must be signed in to change notification settings - Fork 39.1k
(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
Changes from 3 commits
5fabf0e
239fa54
19df6dd
daf1bc2
6021de5
d862297
35f06a0
6872d18
34f628c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -20,9 +20,9 @@ const { applyReporter } = require('../reporter'); | |||||
| // opts | ||||||
| const defaultReporterName = process.platform === 'win32' ? 'list' : 'spec'; | ||||||
| const optimist = require('optimist') | ||||||
| // .describe('grep', 'only run tests matching <pattern>').alias('grep', 'g').alias('grep', 'f').string('grep') | ||||||
| .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') | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should be
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
emmmm, but in Line 24 in 89db3e4
vscode/test/unit/browser/index.js Line 84 in 89db3e4
--glob. Has it been abandoned?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It looks like in the electron test we allow both |
||||||
| .describe('grep', 'only run tests matching <pattern>').alias('grep', 'g').alias('grep', 'f').string('grep') | ||||||
| .describe('debug', 'do not run browsers headless').alias('debug', ['debug-browser']).boolean('debug') | ||||||
| .describe('sequential', 'only run suites for a single browser at a time').boolean('sequential') | ||||||
|
|
@@ -83,7 +83,7 @@ const testModules = (async function () { | |||||
| } else { | ||||||
| // glob patterns (--glob) | ||||||
| const defaultGlob = '**/*.test.js'; | ||||||
| const pattern = argv.run || defaultGlob; | ||||||
| const pattern = (argv.glob || defaultGlob).replace(new RegExp(`^(${out}|src)/`), '').replace(/\.ts$/, '.js'); | ||||||
| isDefaultModules = pattern === defaultGlob; | ||||||
|
|
||||||
| promise = new Promise((resolve, reject) => { | ||||||
|
|
||||||
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.
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.vscode/src/vs/workbench/test/browser/workbenchTestServices.ts
Line 663 in 89db3e4
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.