@@ -18,24 +18,26 @@ describe('extractStack', () => {
1818 httpsTrigger : { } , 
1919 } ; 
2020
21+  const  callableFn  =  functions . https . onCall ( ( )  =>  { } ) ; 
22+  const  callableEndpoint  =  { 
23+  platform : 'gcfv1' , 
24+  labels : { } ,  // TODO: empty labels? 
25+  callableTrigger : { } , 
26+  } ; 
27+ 
2128 it ( 'extracts stack from a simple module' ,  ( )  =>  { 
2229 const  module  =  { 
2330 http : httpFn , 
24-  callable : functions . https . onCall ( ( )   =>   { } ) , 
31+  callable : callableFn , 
2532 } ; 
2633
2734 const  endpoints : Record < string ,  ManifestEndpoint >  =  { } ; 
2835 const  requiredAPIs : Record < string ,  ManifestRequiredAPI >  =  { } ; 
2936 loader . extractStack ( module ,  endpoints ,  requiredAPIs ) ; 
3037
3138 expect ( endpoints ) . to . be . deep . equal ( { 
32-  http : {  entryPoint : 'http' ,  ...httpEndpoint  } , 
33-  callable : { 
34-  entryPoint : 'callable' , 
35-  platform : 'gcfv1' , 
36-  labels : { } ,  // TODO: empty labels? 
37-  callableTrigger : { } , 
38-  } , 
39+  http : { entryPoint : 'http' ,  ...httpEndpoint } , 
40+  callable : { entryPoint : 'callable' ,  ...callableEndpoint } , 
3941 } ) ; 
4042
4143 expect ( requiredAPIs ) . to . be . empty ; 
@@ -68,9 +70,9 @@ describe('extractStack', () => {
6870
6971 it ( 'extracts stack from a module with group functions' ,  ( )  =>  { 
7072 const  module  =  { 
71-  fn1 : annotatedFn ( HTTP_ENDPOINT ) , 
73+  fn1 : httpFn , 
7274 g1 : { 
73-  fn2 : annotatedFn ( EVENT_ENDPOINT ) , 
75+  fn2 : httpFn , 
7476 } , 
7577 } ; 
7678
@@ -80,11 +82,11 @@ describe('extractStack', () => {
8082 expect ( endpoints ) . to . be . deep . equal ( { 
8183 fn1 : { 
8284 entryPoint : 'fn1' , 
83-  ...HTTP_ENDPOINT , 
85+  ...httpEndpoint , 
8486 } , 
8587 'g1-fn2' : { 
8688 entryPoint : 'g1.fn2' , 
87-  ...EVENT_ENDPOINT , 
89+  ...httpEndpoint , 
8890 } , 
8991 } ) ; 
9092 } ) ; 
@@ -112,7 +114,7 @@ describe('extractStack', () => {
112114 loader . extractStack ( module ,  endpoints ,  requiredAPIs ) ; 
113115
114116 expect ( endpoints ) . to . be . deep . equal ( { 
115-  http : { 
117+  fn : { 
116118 entryPoint : 'fn' , 
117119 platform : 'gcfv1' , 
118120 eventTrigger : { 
0 commit comments