diff options
author | Bartek Iwańczuk <biwanczuk@gmail.com> | 2020-02-11 17:24:27 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-11 17:24:27 +0100 |
commit | 61273085e40fb4d992eef4b1b5601e3567c80664 (patch) | |
tree | 1ac0f401d4cb897bdb6f88e3a5c47fece2856f89 /std/encoding/base32_test.ts | |
parent | e0bcecee6042b219c6626172851af5a25362b948 (diff) |
refactor: rewrite tests in std/ to use Deno.test (#3930)
Diffstat (limited to 'std/encoding/base32_test.ts')
-rw-r--r-- | std/encoding/base32_test.ts | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/std/encoding/base32_test.ts b/std/encoding/base32_test.ts index 6a8734fd0..eb51e44ab 100644 --- a/std/encoding/base32_test.ts +++ b/std/encoding/base32_test.ts @@ -1,7 +1,6 @@ // Test cases copied from https://github.com/LinusU/base32-encode/blob/master/test.js // Copyright (c) 2016-2017 Linus Unnebäck. MIT license. // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. -import { test, runIfMain } from "../testing/mod.ts"; import { assertEquals, assert } from "../testing/asserts.ts"; import { encode, decode } from "./base32.ts"; @@ -87,7 +86,7 @@ const testCases = [ ] ]; -test({ +Deno.test({ name: "[encoding.base32] encode", fn(): void { for (const [bin, b32] of testCases) { @@ -96,7 +95,7 @@ test({ } }); -test({ +Deno.test({ name: "[encoding.base32] decode", fn(): void { for (const [bin, b32] of testCases) { @@ -105,7 +104,7 @@ test({ } }); -test({ +Deno.test({ name: "[encoding.base32] decode bad length", fn(): void { let errorCaught = false; @@ -121,7 +120,7 @@ test({ } }); -test({ +Deno.test({ name: "[encoding.base32] decode bad padding", fn(): void { let errorCaught = false; @@ -134,5 +133,3 @@ test({ assert(errorCaught); } }); - -runIfMain(import.meta); |