File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -26,9 +26,9 @@ import { GlobalState } from '../shared/globalState'
2626import { FeatureConfigProvider } from '../shared/featureConfig'
2727import { mockFeatureConfigsData } from './fake/mockFeatureConfigData'
2828import { fs } from '../shared'
29+ import { rm , mkdir } from 'fs/promises' //eslint-disable-line no-restricted-imports
2930
3031disableAwsSdkWarning ( )
31-
3232const testReportDir = join ( __dirname , '../../../../../.test-reports' ) // Root project, not subproject
3333const testLogOutput = join ( testReportDir , 'testLog.log' )
3434const globalSandbox = sinon . createSandbox ( )
@@ -42,10 +42,11 @@ let openExternalStub: sinon.SinonStub<Parameters<(typeof vscode)['env']['openExt
4242export async function mochaGlobalSetup ( extensionId : string ) {
4343 return async function ( this : Mocha . Runner ) {
4444 // Clean up and set up test logs
45+ // Use nodefs over our fs since globals may not be initialized yet and our fs checks isWeb via globals.
4546 try {
46- await fs . delete ( testLogOutput )
47+ await rm ( testLogOutput )
4748 } catch ( e ) { }
48- await fs . mkdir ( testReportDir )
49+ await mkdir ( testReportDir , { recursive : true } )
4950
5051 sinon . stub ( FeatureConfigProvider . prototype , 'listFeatureEvaluations' ) . resolves ( {
5152 featureEvaluations : mockFeatureConfigsData ,
You can’t perform that action at this time.
0 commit comments