(response: Response, name: string)
| 23 | const unique = (prefix: string) => `${prefix}_${randomBytes(4).toString("hex")}`; |
| 24 | |
| 25 | const cookiePair = (response: Response, name: string): string | undefined => { |
| 26 | for (const header of response.headers.getSetCookie?.() ?? []) { |
| 27 | if (header.startsWith(`${name}=`)) return header.split(";")[0]; |
| 28 | } |
| 29 | return undefined; |
| 30 | }; |
| 31 | |
| 32 | const cookieValue = (pair: string): string => { |
| 33 | const [, value] = pair.split(/=(.*)/s); |
no outgoing calls
no test coverage detected