@@ -23,7 +23,7 @@ import { promises as fs } from 'fs';
2323import { constants as fsconstants } from 'fs' ;
2424import { randomFilepath } from '../src/random' ;
2525
26- import { isEmptyDir , forceRemove , removeFile , writeSecureFile } from '../src/fs' ;
26+ import { isEmptyDir , forceRemove , writeSecureFile } from '../src/fs' ;
2727
2828describe ( 'fs' , { concurrency : true } , async ( ) => {
2929 test ( '#forceRemove' , async ( suite ) => {
@@ -74,25 +74,6 @@ describe('fs', { concurrency: true }, async () => {
7474 }
7575 } ) ;
7676
77- test ( '#removeFile' , async ( suite ) => {
78- await suite . test ( 'deletes the file' , async ( ) => {
79- const filepath = randomFilepath ( ) ;
80- await fs . writeFile ( filepath , 'my data' ) ;
81- const deleted = await removeFile ( filepath ) ;
82- assert . deepStrictEqual ( deleted , true ) ;
83-
84- await assert . rejects ( async ( ) => {
85- await fs . access ( filepath , fsconstants . F_OK ) ;
86- } , / E N O E N T / ) ;
87- } ) ;
88-
89- await suite . test ( 'does nothing when the file does not exist' , async ( ) => {
90- const filepath = '/not/a/file' ;
91- const deleted = await removeFile ( filepath ) ;
92- assert . deepStrictEqual ( deleted , false ) ;
93- } ) ;
94- } ) ;
95-
9677 test ( '#writeSecureFile' , async ( suite ) => {
9778 await suite . test ( 'writes a file' , async ( ) => {
9879 const filepath = randomFilepath ( ) ;
0 commit comments