Skip to content

Commit

Permalink
Add test for Priority attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
brophdawg11 committed Nov 6, 2023
1 parent 9909cc4 commit 85c55ec
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions packages/remix-server-runtime/__tests__/cookies-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,20 @@ describe("cookies", () => {
expect(setCookie2).toContain("Path=/about");
});

it("supports the Priority attribute", async () => {
let cookie = createCookie("my-cookie");

let setCookie = await cookie.serialize("hello world");
expect(setCookie).not.toContain("Priority");

let cookie2 = createCookie("my-cookie2");

let setCookie2 = await cookie2.serialize("hello world", {
priority: "high",
});
expect(setCookie2).toContain("Priority=High");
});

describe("warnings when providing options you may not want to", () => {
let spy = spyConsole();

Expand Down

0 comments on commit 85c55ec

Please sign in to comment.