Skip to content

Commit

Permalink
uglify stream generator
Browse files Browse the repository at this point in the history
  • Loading branch information
LiviaMedeiros committed Sep 5, 2023
1 parent c2f9120 commit 9d545ab
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions test/sequence.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@ const getNumber = () => [
: new Int16Array(textEncoder.encode(`${_i++}`).buffer),
][Math.floor(Math.random() * 4)]();

const bodygen = (n = 10, pause = 9) => {
let $ = null;
return new ReadableStream({
const bodygen = (n = 10, pause = 9, $ = null) =>
new ReadableStream({
start: _ =>
$ = setInterval(
() => n--
Expand All @@ -33,7 +32,6 @@ const bodygen = (n = 10, pause = 9) => {
),
cancel: () => clearInterval($),
});
};

const validate = (actual, expected = {}, headers = {}) => {
assert.ok(actual instanceof Response, `${actual} is not Response`);
Expand Down

0 comments on commit 9d545ab

Please sign in to comment.