@@ -35,6 +35,8 @@ test("ProxyClient: supports service bindings with WebSockets", async (t) => {
3535 } ,
3636 } ,
3737 } ) ;
38+ t . teardown ( ( ) => mf . dispose ( ) ) ;
39+
3840 const { CUSTOM } = await mf . getBindings < {
3941 CUSTOM : ReplaceWorkersTypes < Fetcher > ;
4042 } > ( ) ;
@@ -53,6 +55,8 @@ test("ProxyClient: supports service bindings with WebSockets", async (t) => {
5355
5456test ( "ProxyClient: supports serialising multiple ReadableStreams, Blobs and Files" , async ( t ) => {
5557 const mf = new Miniflare ( { script : nullScript } ) ;
58+ t . teardown ( ( ) => mf . dispose ( ) ) ;
59+
5660 const client = await mf . _getProxyClient ( ) ;
5761 const IDENTITY = client . env . IDENTITY as {
5862 asyncIdentity < Args extends any [ ] > ( ...args : Args ) : Promise < Args > ;
@@ -130,6 +134,8 @@ test("ProxyClient: poisons dependent proxies after setOptions()/dispose()", asyn
130134} ) ;
131135test ( "ProxyClient: logging proxies provides useful information" , async ( t ) => {
132136 const mf = new Miniflare ( { script : nullScript } ) ;
137+ t . teardown ( ( ) => mf . dispose ( ) ) ;
138+
133139 const caches = await mf . getCaches ( ) ;
134140 const inspectOpts : util . InspectOptions = { colors : false } ;
135141 t . is (
@@ -160,6 +166,7 @@ test("ProxyClient: stack traces don't include internal implementation", async (t
160166 // https://developers.cloudflare.com/workers/configuration/compatibility-dates/#do-not-throw-from-async-functions
161167 compatibilityFlags : [ "capture_async_api_throws" ] ,
162168 } ) ;
169+ t . teardown ( ( ) => mf . dispose ( ) ) ;
163170
164171 const ns = await mf . getDurableObjectNamespace ( "OBJECT" ) ;
165172 const caches = await mf . getCaches ( ) ;
@@ -189,6 +196,8 @@ test("ProxyClient: stack traces don't include internal implementation", async (t
189196} ) ;
190197test ( "ProxyClient: can access ReadableStream property multiple times" , async ( t ) => {
191198 const mf = new Miniflare ( { script : nullScript , r2Buckets : [ "BUCKET" ] } ) ;
199+ t . teardown ( ( ) => mf . dispose ( ) ) ;
200+
192201 const bucket = await mf . getR2Bucket ( "BUCKET" ) ;
193202 await bucket . put ( "key" , "value" ) ;
194203 const objectBody = await bucket . get ( "key" ) ;
@@ -198,6 +207,8 @@ test("ProxyClient: can access ReadableStream property multiple times", async (t)
198207} ) ;
199208test ( "ProxyClient: returns empty ReadableStream synchronously" , async ( t ) => {
200209 const mf = new Miniflare ( { script : nullScript , r2Buckets : [ "BUCKET" ] } ) ;
210+ t . teardown ( ( ) => mf . dispose ( ) ) ;
211+
201212 const bucket = await mf . getR2Bucket ( "BUCKET" ) ;
202213 await bucket . put ( "key" , "" ) ;
203214 const objectBody = await bucket . get ( "key" ) ;
0 commit comments