diff options
| author | Samrith Shankar <samrith-s@users.noreply.github.com> | 2020-03-20 14:38:34 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-03-20 09:38:34 -0400 |
| commit | 798904b0f2ed0c7284b67bba2f125f406b5850de (patch) | |
| tree | 5aba8d35aa8984aa778c894258bcaed56f1ce17c /std/http/mock.ts | |
| parent | 35f6e2e45ddb96524a6bdf54b0a6155caa88d5e0 (diff) | |
Add require-await lint rule (#4401)
Diffstat (limited to 'std/http/mock.ts')
| -rw-r--r-- | std/http/mock.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/std/http/mock.ts b/std/http/mock.ts index 3a4eeed82..cee697bed 100644 --- a/std/http/mock.ts +++ b/std/http/mock.ts @@ -14,11 +14,11 @@ export function mockConn(base: Partial<Deno.Conn> = {}): Deno.Conn { rid: -1, closeRead: (): void => {}, closeWrite: (): void => {}, - read: async (): Promise<number | Deno.EOF> => { - return 0; + read: (): Promise<number | Deno.EOF> => { + return Promise.resolve(0); }, - write: async (): Promise<number> => { - return -1; + write: (): Promise<number> => { + return Promise.resolve(-1); }, close: (): void => {}, ...base |
