Skip to content

Commit 37f07ef

Browse files
committed
make it clear we are using nodefs features
1 parent 7d8c4cf commit 37f07ef

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/core/src/test/globalSetup.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import { GlobalState } from '../shared/globalState'
2626
import { FeatureConfigProvider } from '../shared/featureConfig'
2727
import { mockFeatureConfigsData } from './fake/mockFeatureConfigData'
2828
import { fs } from '../shared'
29-
import { rm, mkdir } from 'fs/promises' //eslint-disable-line no-restricted-imports
29+
import { promises as nodefs } from 'fs' //eslint-disable-line no-restricted-imports
3030

3131
disableAwsSdkWarning()
3232
const testReportDir = join(__dirname, '../../../../../.test-reports') // Root project, not subproject
@@ -43,8 +43,8 @@ export async function mochaGlobalSetup(extensionId: string) {
4343
return async function (this: Mocha.Runner) {
4444
// Clean up and set up test logs
4545
// Use nodefs over our fs since globals may not be initialized yet and our fs checks isWeb via globals.
46-
await rm(testLogOutput, { force: true })
47-
await mkdir(testReportDir, { recursive: true })
46+
await nodefs.rm(testLogOutput, { force: true })
47+
await nodefs.mkdir(testReportDir, { recursive: true })
4848

4949
sinon.stub(FeatureConfigProvider.prototype, 'listFeatureEvaluations').resolves({
5050
featureEvaluations: mockFeatureConfigsData,

0 commit comments

Comments
 (0)