summaryrefslogtreecommitdiff
path: root/std/archive/tar_test.ts
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2020-02-11 17:24:27 +0100
committerGitHub <noreply@github.com>2020-02-11 17:24:27 +0100
commit61273085e40fb4d992eef4b1b5601e3567c80664 (patch)
tree1ac0f401d4cb897bdb6f88e3a5c47fece2856f89 /std/archive/tar_test.ts
parente0bcecee6042b219c6626172851af5a25362b948 (diff)
refactor: rewrite tests in std/ to use Deno.test (#3930)
Diffstat (limited to 'std/archive/tar_test.ts')
-rw-r--r--std/archive/tar_test.ts9
1 files changed, 3 insertions, 6 deletions
diff --git a/std/archive/tar_test.ts b/std/archive/tar_test.ts
index d317a89dd..1bac623b0 100644
--- a/std/archive/tar_test.ts
+++ b/std/archive/tar_test.ts
@@ -8,7 +8,6 @@
* **to run this test**
* deno run --allow-read archive/tar_test.ts
*/
-import { test, runIfMain } from "../testing/mod.ts";
import { assertEquals } from "../testing/asserts.ts";
import { resolve } from "../path/mod.ts";
@@ -16,7 +15,7 @@ import { Tar, Untar } from "./tar.ts";
const filePath = resolve("archive", "testdata", "example.txt");
-test(async function createTarArchive(): Promise<void> {
+Deno.test(async function createTarArchive(): Promise<void> {
// initialize
const tar = new Tar();
@@ -41,7 +40,7 @@ test(async function createTarArchive(): Promise<void> {
assertEquals(wrote, 3072);
});
-test(async function deflateTarArchive(): Promise<void> {
+Deno.test(async function deflateTarArchive(): Promise<void> {
const fileName = "output.txt";
const text = "hello tar world!";
@@ -64,7 +63,7 @@ test(async function deflateTarArchive(): Promise<void> {
assertEquals(untarText, text);
});
-test(async function appendFileWithLongNameToTarArchive(): Promise<void> {
+Deno.test(async function appendFileWithLongNameToTarArchive(): Promise<void> {
// 9 * 15 + 13 = 148 bytes
const fileName = new Array(10).join("long-file-name/") + "file-name.txt";
const text = "hello tar world!";
@@ -87,5 +86,3 @@ test(async function appendFileWithLongNameToTarArchive(): Promise<void> {
assertEquals(result.fileName, fileName);
assertEquals(untarText, text);
});
-
-runIfMain(import.meta);