Skip to content

Commit

Permalink
test: update test for bun headers (#1684)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hebilicious committed Sep 1, 2023
1 parent 3315c99 commit ab15724
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions test/tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,7 @@ export function testNitro(
"nitro-dev",
"vercel",
nodeVersion < 18 && "deno-server",
nodeVersion < 18 && "bun",
].filter(Boolean);
if (notSplitingPresets.includes(ctx.preset)) {
expectedCookies =
Expand All @@ -550,7 +551,7 @@ export function testNitro(
: ["foo=bar, bar=baz", "test=value; Path=/", "test2=value; Path=/"];
}

// TODO: verce-ledge joins all cookies for some reason!
// TODO: vercel-edge joins all cookies for some reason!
if (ctx.preset === "vercel-edge") {
expectedCookies =
"foo=bar, bar=baz, test=value; Path=/, test2=value; Path=/";
Expand All @@ -562,12 +563,6 @@ export function testNitro(
"foo=bar, bar=baz,test=value; Path=/,test2=value; Path=/";
}

// TODO: Bun does not handles set-cookie at all
// https://github.com/unjs/nitro/issues/1461
if (["bun"].includes(ctx.preset)) {
return;
}

expect(headers["set-cookie"]).toMatchObject(expectedCookies);
});
});
Expand Down

0 comments on commit ab15724

Please sign in to comment.