File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -38,21 +38,17 @@ async function runAllExtensionTests(testsRoot: string, clb: (error: Error | null
3838 importAll ( require . context ( './' , true , / \. t e s t $ / ) ) ;
3939 } catch ( e ) {
4040 // Fallback if 'require.context' is not available (e.g., in non-webpack environments)
41- try {
42- const files = glob . sync ( '**/*.test.js' , {
43- cwd : testsRoot ,
44- absolute : true ,
45- // Browser/webview tests are loaded via the separate browser runner
46- ignore : [ 'browser/**' ]
47- } ) ;
48- if ( ! files . length ) {
49- console . log ( 'Fallback test discovery found no test files. Original error:' , e ) ;
50- }
51- for ( const f of files ) {
52- mocha . addFile ( f ) ;
53- }
54- } catch ( fallbackErr ) {
55- console . log ( 'Both require.context and glob fallback failed to load tests' , fallbackErr ) ;
41+ const files = glob . sync ( '**/*.test.js' , {
42+ cwd : testsRoot ,
43+ absolute : true ,
44+ // Browser/webview tests are loaded via the separate browser runner
45+ ignore : [ 'browser/**' ]
46+ } ) ;
47+ if ( ! files . length ) {
48+ console . log ( 'Fallback test discovery found no test files. Original error:' , e ) ;
49+ }
50+ for ( const f of files ) {
51+ mocha . addFile ( f ) ;
5652 }
5753 }
5854
You can’t perform that action at this time.
0 commit comments