diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2021-11-23 17:45:18 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-23 17:45:18 +0100 |
commit | bedb2adfb065c1b0d3bcb773fbeff91230402b6b (patch) | |
tree | b4d90c36f2409f7f9b6247b74e9c111a38befcdf /cli/tests/unit/io_test.ts | |
parent | 51e3db956a5927229e3f46f4eaaf317e935f8f17 (diff) |
refactor: remove "unitTest" wrapper from cli/tests/unit (#12750)
Diffstat (limited to 'cli/tests/unit/io_test.ts')
-rw-r--r-- | cli/tests/unit/io_test.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cli/tests/unit/io_test.ts b/cli/tests/unit/io_test.ts index 5338bbc5e..ac6c9e209 100644 --- a/cli/tests/unit/io_test.ts +++ b/cli/tests/unit/io_test.ts @@ -1,5 +1,5 @@ // Copyright 2018-2021 the Deno authors. All rights reserved. MIT license. -import { assertEquals, unitTest } from "./test_util.ts"; +import { assertEquals } from "./test_util.ts"; import { Buffer } from "../../../test_util/std/io/buffer.ts"; const DEFAULT_BUF_SIZE = 32 * 1024; @@ -28,7 +28,7 @@ function spyRead(obj: Buffer): Spy { return spy; } -unitTest(async function copyWithDefaultBufferSize() { +Deno.test(async function copyWithDefaultBufferSize() { const xBytes = repeat("b", DEFAULT_BUF_SIZE); const reader = new Buffer(xBytes.buffer as ArrayBuffer); const write = new Buffer(); @@ -43,7 +43,7 @@ unitTest(async function copyWithDefaultBufferSize() { assertEquals(readSpy.calls, 2); // read with DEFAULT_BUF_SIZE bytes + read with 0 bytes }); -unitTest(async function copyWithCustomBufferSize() { +Deno.test(async function copyWithCustomBufferSize() { const bufSize = 1024; const xBytes = repeat("b", DEFAULT_BUF_SIZE); const reader = new Buffer(xBytes.buffer as ArrayBuffer); @@ -59,7 +59,7 @@ unitTest(async function copyWithCustomBufferSize() { assertEquals(readSpy.calls, DEFAULT_BUF_SIZE / bufSize + 1); }); -unitTest({ permissions: { write: true } }, async function copyBufferToFile() { +Deno.test({ permissions: { write: true } }, async function copyBufferToFile() { const filePath = "test-file.txt"; // bigger than max File possible buffer 16kb const bufSize = 32 * 1024; |