From bc66a7e66b99ad66de81b730492d0aba49f60eb6 Mon Sep 17 00:00:00 2001 From: Aras Abbasi Date: Thu, 10 Oct 2024 20:37:58 +0200 Subject: [PATCH] Generate cookie outside benchmarks (#187) --- src/parse.bench.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/parse.bench.ts b/src/parse.bench.ts index 574f470..1fceabc 100644 --- a/src/parse.bench.ts +++ b/src/parse.bench.ts @@ -15,16 +15,19 @@ describe("parse", () => { cookie.parse('foo="foo bar"'); }); + const duplicates = genCookies(2) + "; " + genCookies(2); bench("duplicates", () => { - cookie.parse(genCookies(2) + "; " + genCookies(2)); + cookie.parse(duplicates); }); + const cookies10 = genCookies(10); bench("10 cookies", () => { - cookie.parse(genCookies(10)); + cookie.parse(cookies10); }); + const cookies100 = genCookies(100); bench("100 cookies", () => { - cookie.parse(genCookies(100)); + cookie.parse(cookies100); }); });