(functionName: string)
| 42 | * @beta |
| 43 | */ |
| 44 | export const getTestServer = (functionName: string): Server => { |
| 45 | const registeredFunction = getRegisteredFunction(functionName); |
| 46 | if (!registeredFunction) { |
| 47 | throw new Error( |
| 48 | `The provided function "${functionName}" was not registered. Did you forget to require the module that defined it?`, |
| 49 | ); |
| 50 | } |
| 51 | return getServer(registeredFunction.userFunction, { |
| 52 | signatureType: registeredFunction.signatureType, |
| 53 | enableExecutionId: false, |
| 54 | timeoutMilliseconds: 0, |
| 55 | port: '0', |
| 56 | target: '', |
| 57 | sourceLocation: '', |
| 58 | printHelp: false, |
| 59 | ignoredRoutes: null, |
| 60 | }); |
| 61 | }; |
no test coverage detected