diff options
author | Nayeem Rahman <nayeemrmn99@gmail.com> | 2020-06-12 20:23:38 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-12 15:23:38 -0400 |
commit | 1fff6f55c3ba98a10018c6d374795e612061e9b6 (patch) | |
tree | 12074b6d44736b11513d857e437f9e30a6bf65a4 /std/testing/bench_test.ts | |
parent | 26bf56afdaf16634ffbaa23684faf3a44cc10f62 (diff) |
refactor: Don't destructure the Deno namespace (#6268)
Diffstat (limited to 'std/testing/bench_test.ts')
-rw-r--r-- | std/testing/bench_test.ts | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/std/testing/bench_test.ts b/std/testing/bench_test.ts index 0b101c22f..b6d64ab89 100644 --- a/std/testing/bench_test.ts +++ b/std/testing/bench_test.ts @@ -1,4 +1,3 @@ -const { test } = Deno; import { bench, runBenchmarks, @@ -14,7 +13,7 @@ import { assertThrowsAsync, } from "./asserts.ts"; -test({ +Deno.test({ name: "benching", fn: async function (): Promise<void> { @@ -101,7 +100,7 @@ test({ }, }); -test({ +Deno.test({ name: "Bench without name should throw", fn() { assertThrows( @@ -114,7 +113,7 @@ test({ }, }); -test({ +Deno.test({ name: "Bench without stop should throw", fn: async function (): Promise<void> { await assertThrowsAsync( @@ -131,7 +130,7 @@ test({ }, }); -test({ +Deno.test({ name: "Bench without start should throw", fn: async function (): Promise<void> { await assertThrowsAsync( @@ -148,7 +147,7 @@ test({ }, }); -test({ +Deno.test({ name: "Bench with stop before start should throw", fn: async function (): Promise<void> { await assertThrowsAsync( @@ -166,7 +165,7 @@ test({ }, }); -test({ +Deno.test({ name: "clearBenchmarks should clear all candidates", fn: async function (): Promise<void> { dummyBench("test"); @@ -179,7 +178,7 @@ test({ }, }); -test({ +Deno.test({ name: "clearBenchmarks with only as option", fn: async function (): Promise<void> { // to reset candidates @@ -197,7 +196,7 @@ test({ }, }); -test({ +Deno.test({ name: "clearBenchmarks with skip as option", fn: async function (): Promise<void> { // to reset candidates @@ -215,7 +214,7 @@ test({ }, }); -test({ +Deno.test({ name: "clearBenchmarks with only and skip as option", fn: async function (): Promise<void> { // to reset candidates @@ -236,7 +235,7 @@ test({ }, }); -test({ +Deno.test({ name: "progressCallback of runBenchmarks", fn: async function (): Promise<void> { clearBenchmarks(); @@ -338,7 +337,7 @@ test({ }, }); -test({ +Deno.test({ name: "async progressCallback", fn: async function (): Promise<void> { clearBenchmarks(); |