MCPcopy Index your code
hub / github.com/ParallelTask/dinoloop / TestController

Class TestController

tests/integration/api.controller.spec.ts:57–89  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55}
56
57@Controller('/test')
58class TestController extends ApiController {
59
60 @SendsResponse()
61 @HttpGet('/proceedCb')
62 proceedCb(): void {
63 setTimeout(() => {
64 this.dino.proceed({ data: 'Response_End' });
65 }, 2);
66 }
67
68 @SendsResponse()
69 @HttpGet('/errCb')
70 errCb(): void {
71 setTimeout(() => {
72 this.dino.throw(new Error('TestError'));
73 }, 2);
74 }
75
76 @SendsResponse()
77 @HttpGet('/nextCb')
78 netWithCallback(): void {
79 setTimeout(() => {
80 return this.next();
81 }, 2);
82 }
83
84 // GET ?id=42
85 @HttpGet('/query')
86 query(): any {
87 return { data: this.request.query.id };
88 }
89}
90
91describe('api.controller.e2e.spec', () => {
92 const baseRoute = '/api/test';

Callers

nothing calls this directly

Calls 3

ControllerFunction · 0.85
SendsResponseFunction · 0.85
HttpGetFunction · 0.85

Tested by

no test coverage detected