mirror of
https://github.com/denoland/std.git
synced 2024-11-21 20:50:22 +00:00
chore: replace console.log with array and assertEquals (#2261)
This commit is contained in:
parent
11b2b7f7f7
commit
6dcb19b003
@ -15,9 +15,11 @@ Deno.test("[async] pooledMap", async function () {
|
||||
[1, 2, 3],
|
||||
(i) => new Promise((r) => setTimeout(() => r(i), 1000)),
|
||||
);
|
||||
const array = [];
|
||||
for await (const value of results) {
|
||||
console.log(value);
|
||||
array.push(value);
|
||||
}
|
||||
assertEquals(array, [1, 2, 3]);
|
||||
const diff = new Date().getTime() - start.getTime();
|
||||
assert(diff >= 2000);
|
||||
assert(diff < 3000);
|
||||
|
Loading…
Reference in New Issue
Block a user