| 91 | } |
| 92 | |
| 93 | @Controller() |
| 94 | class ImplRouterController { |
| 95 | @Implement(contract) |
| 96 | @AdvanceMeta |
| 97 | router(@Req() _req: NodeHttpRequest) { |
| 98 | req = _req |
| 99 | |
| 100 | return { |
| 101 | ping: implement(contract.ping).handler(ping_handler), |
| 102 | pong: lazy(() => Promise.resolve({ default: implement(contract.pong).handler(pong_handler) })), |
| 103 | nested: lazy(() => Promise.resolve({ |
| 104 | default: { |
| 105 | peng: implement(contract.nested.peng).handler(peng_handler), |
| 106 | }, |
| 107 | })), |
| 108 | } |
| 109 | } |
| 110 | |
| 111 | /** |
| 112 | * Make sure the @Implement can prevent conflict method name |
| 113 | */ |
| 114 | router_ping() { |
| 115 | return 'router_ping' |
| 116 | } |
| 117 | |
| 118 | /** |
| 119 | * Make sure the @Implement can prevent conflict method name |
| 120 | */ |
| 121 | router_ping_0() { |
| 122 | return 'router_ping_0' |
| 123 | } |
| 124 | |
| 125 | /** |
| 126 | * Make sure the @Implement can prevent conflict method name |
| 127 | */ |
| 128 | router_nested_peng() { |
| 129 | return 'router_nested_peng' |
| 130 | } |
| 131 | } |
| 132 | |
| 133 | describe.each([ |
| 134 | [ImplProcedureController, 'implement each standalone procedure'], |
nothing calls this directly
no test coverage detected