@@ -108,7 +108,7 @@ Deno.test("$.request", (t) => {
108108 } ) ;
109109
110110 step ( "pipeToPath" , async ( ) => {
111- const testFilePath = Deno . makeTempFileSync ( ) ;
111+ const testFilePath = await Deno . makeTempFile ( ) ;
112112 const originDir = Deno . cwd ( ) ;
113113 try {
114114 {
@@ -121,7 +121,7 @@ Deno.test("$.request", (t) => {
121121 }
122122 {
123123 // test default path
124- Deno . chdir ( Deno . makeTempDirSync ( ) ) ; // change path just to not download to the current dir
124+ Deno . chdir ( await Deno . makeTempDir ( ) ) ; // change path just to not download to the current dir
125125 const downloadedFilePath = await new RequestBuilder ( )
126126 . url ( new URL ( "/text-file" , serverUrl ) )
127127 . showProgress ( )
@@ -151,7 +151,7 @@ Deno.test("$.request", (t) => {
151151 }
152152 {
153153 // test downloading to a directory
154- const tempDir = Deno . makeTempDirSync ( ) ;
154+ const tempDir = await Deno . makeTempDir ( ) ;
155155 const downloadedFilePath = await new RequestBuilder ( )
156156 . url ( new URL ( "/text-file" , serverUrl ) )
157157 . showProgress ( )
@@ -162,7 +162,7 @@ Deno.test("$.request", (t) => {
162162 } finally {
163163 try {
164164 Deno . chdir ( originDir ) ;
165- Deno . removeSync ( testFilePath ) ;
165+ await Deno . remove ( testFilePath ) ;
166166 } catch {
167167 // do nothing
168168 }
0 commit comments