File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 11import * as upload from '../src/upload'
2- import { writeFile , rm } from 'fs/promises '
2+ import * as fs from 'fs'
33import { mocked } from 'ts-jest/utils'
44
55jest . spyOn ( upload , 'uploadBlob' )
@@ -13,8 +13,8 @@ describe('upload-azure-blob => upload.ts', () => {
1313
1414 beforeAll ( async ( ) => {
1515 const data = new Uint8Array ( Buffer . from ( 'Hello Node.js' ) ) ;
16- await writeFile ( FILENAME , data ) ;
17- await writeFile ( FILENAME2 , data ) ;
16+ await fs . promises . writeFile ( FILENAME , data ) ;
17+ await fs . promises . writeFile ( FILENAME2 , data ) ;
1818 } )
1919
2020 test ( 'uploadBlobs calls uploadBlob with one file' , async ( ) => {
@@ -33,7 +33,7 @@ describe('upload-azure-blob => upload.ts', () => {
3333 } )
3434
3535 afterAll ( async ( ) => {
36- await rm ( FILENAME ) ;
37- await rm ( FILENAME2 ) ;
36+ await fs . promises . rm ( FILENAME ) ;
37+ await fs . promises . rm ( FILENAME2 ) ;
3838 } )
3939} )
You can’t perform that action at this time.
0 commit comments