From 7efe5efb78440a17e78a3e2c7bb02205604a498e Mon Sep 17 00:00:00 2001 From: Alvin Ng <243186+alvinsj@users.noreply.github.com> Date: Sat, 8 Jun 2024 18:27:00 +0800 Subject: [PATCH] add spaces --- src/lib/__tests__/stateCookie.test.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib/__tests__/stateCookie.test.ts b/src/lib/__tests__/stateCookie.test.ts index 1104ebb..918b0c0 100644 --- a/src/lib/__tests__/stateCookie.test.ts +++ b/src/lib/__tests__/stateCookie.test.ts @@ -6,16 +6,19 @@ describe("setStateCookie", () => { expect(() => setStateCookie("")) .toThrow("state value is required") }) + test("sets cookie with prefix app.txs", () => { const state = setStateCookie("code_verifier_secret") expect(document.cookie) .toMatch(`app.txs.${state}=code_verifier_secret`) }) + test("sets cookie with latest value", () => { const state = setStateCookie("code_verifier_secret") expect(document.cookie) .toMatch(`app.txs.${state}=code_verifier_secret`) }) + test("returns state", () => { const state = setStateCookie("code_verifier_secret") expect(state).toMatch(/[\w-]+/)