diff options
| author | Yoshiya Hinosawa <stibium121@gmail.com> | 2019-09-08 01:27:18 +0900 |
|---|---|---|
| committer | Ryan Dahl <ry@tinyclouds.org> | 2019-09-07 12:27:18 -0400 |
| commit | f12acdb50bd6afae21d8d033548c012d23ec2791 (patch) | |
| tree | e61071f25a9dfe3ea853bcaea0ece7307a02bc73 /js/buffer_test.ts | |
| parent | a205e8a3c2bf5ba72fe18bd7f224303338956c62 (diff) | |
Update @typescript-eslint/* to v2.1.0 (#2878)
Diffstat (limited to 'js/buffer_test.ts')
| -rw-r--r-- | js/buffer_test.ts | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/js/buffer_test.ts b/js/buffer_test.ts index 911750bb1..a157b927e 100644 --- a/js/buffer_test.ts +++ b/js/buffer_test.ts @@ -45,7 +45,7 @@ async function fillBytes( ): Promise<string> { check(buf, s); for (; n > 0; n--) { - let m = await buf.write(fub); + const m = await buf.write(fub); assertEquals(m, fub.byteLength); const decoder = new TextDecoder(); s += decoder.decode(fub); @@ -84,7 +84,7 @@ test(function bufferNewBuffer(): void { test(async function bufferBasicOperations(): Promise<void> { init(); - let buf = new Buffer(); + const buf = new Buffer(); for (let i = 0; i < 5; i++) { check(buf, ""); @@ -123,9 +123,9 @@ test(async function bufferBasicOperations(): Promise<void> { test(async function bufferReadEmptyAtEOF(): Promise<void> { // check that EOF of 'buf' is not reached (even though it's empty) if // results are written to buffer that has 0 length (ie. it can't store any data) - let buf = new Buffer(); + const buf = new Buffer(); const zeroLengthTmp = new Uint8Array(0); - let result = await buf.read(zeroLengthTmp); + const result = await buf.read(zeroLengthTmp); assertEquals(result, 0); }); @@ -211,9 +211,9 @@ test(async function bufferReadFromSync(): Promise<void> { test(async function bufferTestGrow(): Promise<void> { const tmp = new Uint8Array(72); - for (let startLen of [0, 100, 1000, 10000, 100000]) { + for (const startLen of [0, 100, 1000, 10000, 100000]) { const xBytes = repeat("x", startLen); - for (let growLen of [0, 100, 1000, 10000, 100000]) { + for (const growLen of [0, 100, 1000, 10000, 100000]) { const buf = new Buffer(xBytes.buffer as ArrayBuffer); // If we read, this affects buf.off, which is good to test. const result = await buf.read(tmp); |
