Skip to content

Commit

Permalink
add spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
alvinsj committed Jun 8, 2024
1 parent 88d1b49 commit 7efe5ef
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/lib/__tests__/stateCookie.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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-]+/)
Expand Down

0 comments on commit 7efe5ef

Please sign in to comment.