MCPcopy Create free account
hub / github.com/solidjs/solid-start / createMockFetchEvent

Function createMockFetchEvent

packages/start/src/fns/handler.spec.ts:27–38  ·  view source on GitHub ↗
(headers: Record<string, string> = {})

Source from the content-addressed store, hash-verified

25}));
26
27function createMockFetchEvent(headers: Record<string, string> = {}): FetchEvent {
28 return {
29 request: new Request("http://localhost/test", { headers }),
30 response: {
31 headers: {
32 getSetCookie: () => [],
33 },
34 },
35 nativeEvent: {},
36 locals: {},
37 } as FetchEvent;
38}
39
40describe("createSingleFlightHeaders", () => {
41 let createSingleFlightHeaders: (sourceEvent: FetchEvent) => Headers;

Callers 1

handler.spec.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…