diff --git a/src/types.ts b/src/types.ts index 9fdda16..d521137 100644 --- a/src/types.ts +++ b/src/types.ts @@ -41,9 +41,9 @@ type ExtraCookieOptions = { } export type CSRFCookieOptions = SetCookieOptions & ExtraCookieOptions -export type ResolvedCSRFCookieOptions = SetCookieOptions - & Required> - & Exclude +export type ResolvedCSRFCookieOptions = SetCookieOptions & + Required> & + Exclude export type TokenRetriever< Request extends CSRFRequest = CSRFRequest, diff --git a/tests/doublecsrf.test.ts b/tests/doublecsrf.test.ts index 51db797..a0945fa 100644 --- a/tests/doublecsrf.test.ts +++ b/tests/doublecsrf.test.ts @@ -1,5 +1,5 @@ -import { assert, describe, it } from "vitest" import { sign, unsign } from "@otterhttp/cookie-signature" +import { assert, describe, it } from "vitest" import { createTestSuite } from "./testsuite" import { COOKIE_SECRET, HEADER_KEY } from "./utils/constants" @@ -28,8 +28,8 @@ createTestSuite("csrf-csrf single secret with cookie-signing", { const result = unsign(signedValue.slice(2), COOKIE_SECRET) if (result === false) throw new Error() return result - } - } + }, + }, }) createTestSuite("csrf-csrf custom options, single secret", {