forked from nestjs/nest
-
Notifications
You must be signed in to change notification settings - Fork 0
/
noop-adapter.spec.ts
30 lines (29 loc) 路 1.11 KB
/
noop-adapter.spec.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import { RequestMethod } from '@nestjs/common';
import { AbstractHttpAdapter } from '../../adapters';
export class NoopHttpAdapter extends AbstractHttpAdapter {
constructor(instance: any) {
super(instance);
}
close(): any {}
initHttpServer(options: any): any {}
useStaticAssets(...args: any[]): any {}
setViewEngine(engine: string): any {}
getRequestHostname(request: any): any {}
getRequestMethod(request: any): any {}
getRequestUrl(request: any): any {}
reply(response: any, body: any): any {}
end(response: any, message?: any): any {}
status(response: any, statusCode: number): any {}
render(response: any, view: string, options: any): any {}
redirect(response: any, statusCode: number, url: string) {}
setErrorHandler(handler: Function, prefix = '/'): any {}
setNotFoundHandler(handler: Function, prefix = '/'): any {}
isHeadersSent(response: any): any {}
setHeader(response: any, name: string, value: string): any {}
registerParserMiddleware(): any {}
enableCors(options: any): any {}
createMiddlewareFactory(requestMethod: RequestMethod): any {}
getType() {
return '';
}
}