salsify-experiences-sdk
Version:
SDK to be used by commerce websites to implement product experiences.
18 lines (14 loc) • 485 B
text/typescript
import { http, HttpResponse } from 'msw'
import { Header } from '../../request'
export const exampleOrigin = 'https://example.com'
export const exampleContent = 'abc'
export const handlers = [
http.head(
exampleOrigin,
() => new HttpResponse(null, { headers: { [Header.ContentLength]: `${exampleContent.length}` } })
),
http.get(
exampleOrigin,
() => new HttpResponse(exampleContent, { headers: { [Header.ContentLength]: `${exampleContent.length}` } })
),
]