@@ -64,10 +64,13 @@ describe("DockerComposeEnvironment", { timeout: 180_000 }, () => {
6464 const env = new DockerComposeEnvironment ( fixtures , "docker-compose-with-many-services.yml" ) ;
6565
6666 await using _ = await env . up ( [ "service_2" ] ) ;
67- await using dockerEventStream = await getDockerEventStream ( ) ;
68- const dockerPullEventPromise = waitForDockerEvent ( dockerEventStream . events , "pull" ) ;
69- await using _ = await env . withPullPolicy ( PullPolicy . alwaysPull ( ) ) . up ( [ "service_2" ] ) ;
70- await dockerPullEventPromise ;
67+
68+ {
69+ await using dockerEventStream = await getDockerEventStream ( ) ;
70+ const dockerPullEventPromise = waitForDockerEvent ( dockerEventStream . events , "pull" ) ;
71+ await using _ = await env . withPullPolicy ( PullPolicy . alwaysPull ( ) ) . up ( [ "service_2" ] ) ;
72+ await dockerPullEventPromise ;
73+ }
7174 } ) ;
7275
7376 it ( "should start environment with multiple compose files" , async ( ) => {
@@ -204,10 +207,12 @@ describe("DockerComposeEnvironment", { timeout: 180_000 }, () => {
204207 } ) ;
205208
206209 it ( "should not recreate the containers when no recreate option is set" , async ( ) => {
207- await using _ = await new DockerComposeEnvironment ( fixtures , "docker-compose-with-name.yml" )
208- . withEnvironment ( { CONTAINER_NAME : `custom_container_name_${ randomUuid ( ) } ` } )
209- . withNoRecreate ( )
210- . up ( ) ;
210+ {
211+ await using _ = await new DockerComposeEnvironment ( fixtures , "docker-compose-with-name.yml" )
212+ . withEnvironment ( { CONTAINER_NAME : `custom_container_name_${ randomUuid ( ) } ` } )
213+ . withNoRecreate ( )
214+ . up ( ) ;
215+ }
211216 await using _ = await new DockerComposeEnvironment ( fixtures , "docker-compose-with-name.yml" )
212217 . withEnvironment ( { CONTAINER_NAME : `custom_container_name_${ randomUuid ( ) } ` } )
213218 . withNoRecreate ( )
0 commit comments