summaryrefslogtreecommitdiff
path: root/testing/mod.ts
diff options
context:
space:
mode:
authorYoshiya Hinosawa <stibium121@gmail.com>2019-10-06 01:02:34 +0900
committerRyan Dahl <ry@tinyclouds.org>2019-10-05 12:02:34 -0400
commit96fe2d10a4da0521b7cd72d90fd42121f9311978 (patch)
treecb4d5ecafa55a3a522cf0ad9d742fb6a1e1f2283 /testing/mod.ts
parent2f90225c89926932a34eb40758e2af0d1742e1f8 (diff)
Update eslint and @typescript-eslint (denoland/deno_std#621)
Original: https://github.com/denoland/deno_std/commit/c3fe858f98565edbe8faeb3cf2e5b873304f4f6e
Diffstat (limited to 'testing/mod.ts')
-rw-r--r--testing/mod.ts11
1 files changed, 5 insertions, 6 deletions
diff --git a/testing/mod.ts b/testing/mod.ts
index 329e02895..3b6386d5b 100644
--- a/testing/mod.ts
+++ b/testing/mod.ts
@@ -62,7 +62,7 @@ function disableConsole(): void {
}
const encoder = new TextEncoder();
-function print(txt: string, newline: boolean = true): void {
+function print(txt: string, newline = true): void {
if (newline) {
txt += "\n";
}
@@ -172,11 +172,11 @@ function createTestResults(tests: TestDefinition[]): TestResults {
);
}
-function formatTestTime(time: number = 0): string {
+function formatTestTime(time = 0): string {
return `${time.toFixed(2)}ms`;
}
-function promptTestTime(time: number = 0, displayWarning = false): string {
+function promptTestTime(time = 0, displayWarning = false): string {
// if time > 5s we display a warning
// only for test time, not the full runtime
if (displayWarning && time >= 5000) {
@@ -308,10 +308,9 @@ async function runTestsSerial(
print(`${yellow("RUNNING")} ${name}`, false);
}
try {
- let start, end;
- start = performance.now();
+ const start = performance.now();
await fn();
- end = performance.now();
+ const end = performance.now();
if (disableLog) {
// Rewriting the current prompt line to erase `running ....`
print(CLEAR_LINE, false);