Skip to content

Commit f3cf8a1

Browse files
committed
remove fs2 references
1 parent 355fcaa commit f3cf8a1

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

packages/core/src/test/eventSchemas/commands/downloadSchemaItemCode.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import admZip from 'adm-zip'
2525
import { makeTemporaryToolkitFolder } from '../../../shared/filesystemUtilities'
2626
import { DefaultSchemaClient } from '../../../shared/clients/schemaClient'
2727
import { fs } from '../../../shared'
28-
import * as fs2 from 'fs'
28+
import * as nodefs from 'fs'
2929

3030
describe('CodeDownloader', function () {
3131
let tempFolder: string
@@ -682,9 +682,9 @@ describe('CodeExtractor', function () {
682682
const zip = new admZip()
683683
zip.addFile(fileName, Buffer.from(fileContent))
684684
const buffer = zip.toBuffer()
685-
const fd = fs2.openSync(zipFileName, 'w')
686-
fs2.writeSync(fd, buffer, 0, buffer.byteLength, 0)
687-
fs2.closeSync(fd)
685+
const fd = nodefs.openSync(zipFileName, 'w')
686+
nodefs.writeSync(fd, buffer, 0, buffer.byteLength, 0)
687+
nodefs.closeSync(fd)
688688

689689
return zip
690690
}

packages/core/src/test/lambda/commands/createNewSamApp.test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ import { Runtime } from '../../../shared/telemetry/telemetry'
3030
import { stub } from '../../utilities/stubber'
3131
import sinon from 'sinon'
3232
import { fs } from '../../../shared'
33-
import * as fs2 from 'fs'
3433

3534
const templateYaml = 'template.yaml'
3635

@@ -94,7 +93,7 @@ describe('createNewSamApp', function () {
9493
)
9594
})
9695
it('returns the target ".yml" file when it exists', async function () {
97-
fs2.unlinkSync(fakeTarget)
96+
await fs.delete(fakeTarget)
9897
tempTemplate = vscode.Uri.file(path.join(tempFolder, 'test.yml'))
9998
fakeTarget = path.join(tempFolder, 'template.yml')
10099
await testutil.toFile('target file', fakeTarget)

0 commit comments

Comments
 (0)