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/io/ioutil_test.ts | |
parent | 35f6e2e45ddb96524a6bdf54b0a6155caa88d5e0 (diff) |
Add require-await lint rule (#4401)
Diffstat (limited to 'std/io/ioutil_test.ts')
-rw-r--r-- | std/io/ioutil_test.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/std/io/ioutil_test.ts b/std/io/ioutil_test.ts index 261f4def0..3d85a0fa1 100644 --- a/std/io/ioutil_test.ts +++ b/std/io/ioutil_test.ts @@ -17,10 +17,10 @@ class BinaryReader implements Reader { constructor(private bytes: Uint8Array = new Uint8Array(0)) {} - async read(p: Uint8Array): Promise<number | Deno.EOF> { + read(p: Uint8Array): Promise<number | Deno.EOF> { p.set(this.bytes.subarray(this.index, p.byteLength)); this.index += p.byteLength; - return p.byteLength; + return Promise.resolve(p.byteLength); } } @@ -52,7 +52,7 @@ Deno.test(async function testReadLong2(): Promise<void> { assertEquals(long, 0x12345678); }); -Deno.test(async function testSliceLongToBytes(): Promise<void> { +Deno.test(function testSliceLongToBytes(): void { const arr = sliceLongToBytes(0x1234567890abcdef); const actual = readLong(new BufReader(new BinaryReader(new Uint8Array(arr)))); const expected = readLong( @@ -65,7 +65,7 @@ Deno.test(async function testSliceLongToBytes(): Promise<void> { assertEquals(actual, expected); }); -Deno.test(async function testSliceLongToBytes2(): Promise<void> { +Deno.test(function testSliceLongToBytes2(): void { const arr = sliceLongToBytes(0x12345678); assertEquals(arr, [0, 0, 0, 0, 0x12, 0x34, 0x56, 0x78]); }); |