summaryrefslogtreecommitdiff
path: root/js/metrics_test.ts
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2019-04-21 16:40:10 -0400
committerGitHub <noreply@github.com>2019-04-21 16:40:10 -0400
commit9dfebbc9496138efbeedc431068f41662c780f3e (patch)
treec3718c3dc132d11c08c8fc18933daebf886bf787 /js/metrics_test.ts
parent6cded14bdf313762956d4d5361cfe8115628b535 (diff)
Fix eslint warnings (#2151)
Co-authored-by: Bartek IwaƄczuk <biwanczuk@gmail.com> Co-authored-by: LE GOFF Vincent <g_n_s@hotmail.fr>
Diffstat (limited to 'js/metrics_test.ts')
-rw-r--r--js/metrics_test.ts21
1 files changed, 12 insertions, 9 deletions
diff --git a/js/metrics_test.ts b/js/metrics_test.ts
index cb76eb854..de41a0cb1 100644
--- a/js/metrics_test.ts
+++ b/js/metrics_test.ts
@@ -1,7 +1,7 @@
// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
import { test, testPerm, assert } from "./test_util.ts";
-test(async function metrics() {
+test(async function metrics(): Promise<void> {
const m1 = Deno.metrics();
assert(m1.opsDispatched > 0);
assert(m1.opsCompleted > 0);
@@ -22,7 +22,7 @@ test(async function metrics() {
assert(m2.bytesReceived > m1.bytesReceived);
});
-testPerm({ write: true }, function metricsUpdatedIfNoResponseSync() {
+testPerm({ write: true }, function metricsUpdatedIfNoResponseSync(): void {
const filename = Deno.makeTempDirSync() + "/test.txt";
const data = new Uint8Array([41, 42, 43]);
@@ -32,12 +32,15 @@ testPerm({ write: true }, function metricsUpdatedIfNoResponseSync() {
assert(metrics.opsDispatched === metrics.opsCompleted);
});
-testPerm({ write: true }, async function metricsUpdatedIfNoResponseAsync() {
- const filename = Deno.makeTempDirSync() + "/test.txt";
+testPerm(
+ { write: true },
+ async function metricsUpdatedIfNoResponseAsync(): Promise<void> {
+ const filename = Deno.makeTempDirSync() + "/test.txt";
- const data = new Uint8Array([41, 42, 43]);
- await Deno.writeFile(filename, data, { perm: 0o666 });
+ const data = new Uint8Array([41, 42, 43]);
+ await Deno.writeFile(filename, data, { perm: 0o666 });
- const metrics = Deno.metrics();
- assert(metrics.opsDispatched === metrics.opsCompleted);
-});
+ const metrics = Deno.metrics();
+ assert(metrics.opsDispatched === metrics.opsCompleted);
+ }
+);