Skip to content

Instantly share code, notes, and snippets.

[
"<h1>Google Cloud Platform</h1>",
"Amazon AWS",
"Docker",
"Digital Ocean"
]
export function toHaveDateValue(this: jest.MatcherContext, input: HTMLInputElement, expectedDate: Date) {
const normalizedInputValue = input.value
.replace(/\u200e|\u2066|\u2067|\u2068|\u2069/g, '')
.replace(/ \/ /g, '/')
const actualDate = new Date(normalizedInputValue)
return {
pass: actualDate.getTime() === expectedDate.getTime(),
message: () => {
const to = this.isNot ? 'not to' : 'to'
@nphmuller
nphmuller / repro-copy-headers.ts
Created August 14, 2024 13:55
next set-cookie edge issue
export default function copyHeaders() {
const headers = new Headers();
headers.append("set-cookie", "cookie1=value1");
headers.append("set-cookie", "cookie2=value2");
const response = new Response(undefined, { headers });
console.log(
`before (length ${headers.getSetCookie().length}): `,
headers.getSetCookie()