@@ -24,7 +24,7 @@ import * as path from 'path';
24
24
import * as proxyquire from 'proxyquire' ;
25
25
import * as sinon from 'sinon' ;
26
26
import { mkdirSync , writeFileSync } from 'fs' ;
27
- import { sync as rimrafSync } from 'rimraf ' ;
27
+ import * as fsp from 'fs/promises ' ;
28
28
import { afterEach , describe , it , beforeEach } from 'mocha' ;
29
29
30
30
import { protobuf } from '../../src/index' ;
@@ -683,7 +683,7 @@ dvorak
683
683
const [ cert , key ] = await client . _detectClientCertificate ( ) ;
684
684
assert . ok ( cert . includes ( 'qwerty' ) ) ;
685
685
assert . ok ( key . includes ( 'dvorak' ) ) ;
686
- rimrafSync ( tmpFolder ) ; // Cleanup.
686
+ await fsp . rm ( tmpFolder , { recursive : true , force : true } ) ; // Cleanup.
687
687
} ) ;
688
688
it ( 'throws if attempted to use mTLS in non-default universe' , async ( ) => {
689
689
// Pretend that "tmp-secure-context" in the current folder is the
@@ -702,7 +702,7 @@ dvorak
702
702
client . createStub ( DummyStub , { universeDomain : 'example.com' } ) ,
703
703
/ c o n f i g u r e d u n i v e r s e d o m a i n /
704
704
) ;
705
- rimrafSync ( tmpFolder ) ; // Cleanup.
705
+ await fsp . rm ( tmpFolder , { recursive : true , force : true } ) ; // Cleanup.
706
706
} ) ;
707
707
} ) ;
708
708
} ) ;
0 commit comments