MCPcopy Create free account
hub / github.com/GoogleCloudPlatform/functions-framework-nodejs / getTestServer

Function getTestServer

src/testing.ts:44–61  ·  view source on GitHub ↗
(functionName: string)

Source from the content-addressed store, hash-verified

42 * @beta
43 */
44export 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};

Callers 2

http.tsFile · 0.90
cloud_event.tsFile · 0.90

Calls 2

getRegisteredFunctionFunction · 0.90
getServerFunction · 0.90

Tested by

no test coverage detected