1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-23 23:59:59 -05:00

fix: benchmarks not returning on deno 0.3.4+ (denoland/deno_std#317)

Original: a1ceaa6ef7
This commit is contained in:
Arash Arbabi 2019-03-31 00:22:33 +04:30 committed by Ryan Dahl
parent d87c37f089
commit fd170692dd
2 changed files with 9 additions and 4 deletions

View file

@ -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();
});

View file

@ -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;