Skip to content

Instantly share code, notes, and snippets.

View devsheva's full-sized avatar
🎯
Focusing

Mateo devsheva

🎯
Focusing
View GitHub Profile
@devsheva
devsheva / factory_helper.ts
Created July 15, 2024 19:43
(Deno.test): Improve Factory Object for async ops
export function promisifyFactoryObj<TFactory>(
obj: TFactory,
status = 200,
): Promise<Response> {
return Promise.resolve(
new Response(JSON.stringify(obj), { status }),
)
}