diff --git a/testing/bench_test.ts b/testing/bench_test.ts index 345f104a66..8042db480f 100644 --- a/testing/bench_test.ts +++ b/testing/bench_test.ts @@ -19,7 +19,8 @@ test(async function benching() { bench(async function forAwaitFetchDenolandX10(b) { b.start(); for (let i = 0; i < 10; i++) { - await fetch("https://deno.land/"); + let r = await fetch("https://deno.land/"); + await r.text(); } b.stop(); }); @@ -27,7 +28,12 @@ test(async function benching() { bench(async function promiseAllFetchDenolandX10(b) { const urls = new Array(10).fill("https://deno.land/"); b.start(); - await Promise.all(urls.map((denoland: string) => fetch(denoland))); + await Promise.all( + urls.map(async (denoland: string) => { + let r = await fetch(denoland); + await r.text(); + }) + ); b.stop(); }); diff --git a/testing/test.ts b/testing/test.ts index 4b68f5bf40..2359cba2ea 100644 --- a/testing/test.ts +++ b/testing/test.ts @@ -11,8 +11,7 @@ import "./format_test.ts"; import "./diff_test.ts"; import "./pretty_test.ts"; import "./asserts_test.ts"; -// TODO(ry) Re-enable these tests - they are causing the a hang. -// import "./bench_test.ts"; +import "./bench_test.ts"; test(function testingAssertEqualActualUncoercable() { let didThrow = false;