@@ -7,11 +7,14 @@ import { TemporaryFileSystem } from '../../../client/common/platform/fs-temp';
77
88interface IDeps {
99 // tmp module
10- file (
11- config : { postfix ?: string ; mode ?: number } ,
12-
13- callback ?: ( err : any , path : string , fd : number , cleanupCallback : ( ) => void ) => void ,
14- ) : void ;
10+ fileSync ( config : {
11+ postfix ?: string ;
12+ mode ?: number ;
13+ } ) : {
14+ name : string ;
15+ fd : number ;
16+ removeCallback ( ) : void ;
17+ } ;
1518}
1619
1720suite ( 'FileSystem - temp files' , ( ) => {
@@ -28,7 +31,7 @@ suite('FileSystem - temp files', () => {
2831 suite ( 'createFile' , ( ) => {
2932 test ( `fails if the raw call fails` , async ( ) => {
3033 const failure = new Error ( 'oops' ) ;
31- deps . setup ( ( d ) => d . file ( { postfix : '.tmp' , mode : undefined } , TypeMoq . It . isAny ( ) ) )
34+ deps . setup ( ( d ) => d . fileSync ( { postfix : '.tmp' , mode : undefined } ) )
3235 // fail with an arbitrary error
3336 . throws ( failure ) ;
3437
@@ -40,7 +43,7 @@ suite('FileSystem - temp files', () => {
4043
4144 test ( `fails if the raw call "returns" an error` , async ( ) => {
4245 const failure = new Error ( 'oops' ) ;
43- deps . setup ( ( d ) => d . file ( { postfix : '.tmp' , mode : undefined } , TypeMoq . It . isAny ( ) ) ) . callback ( ( _cfg , cb ) =>
46+ deps . setup ( ( d ) => d . fileSync ( { postfix : '.tmp' , mode : undefined } ) ) . callback ( ( _cfg , cb ) =>
4447 cb ( failure , '...' , - 1 , ( ) => { } ) ,
4548 ) ;
4649
0 commit comments