Documents / @faasjs/test / test
Function: test()
test(
initBy
):FuncWarper
A simple way to warp a FaasJS function.
Parameters
• initBy: string
| Func
<any
, any
, any
>
{string | Func} Full file path or a FaasJs function
import { test } from '@faasjs/test'
const func = test(__dirname + '/../demo.func.ts')
expect(await func.handler()).toEqual('Hello, world')