refactor: remove "unitTest" wrapper from cli/tests/unit (#12750)

This commit is contained in:
Bartek Iwańczuk 2021-11-23 17:45:18 +01:00 committed by GitHub
parent 51e3db956a
commit bedb2adfb0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
83 changed files with 1049 additions and 1163 deletions

View file

@ -1,7 +1,7 @@
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
import { assert, unitTest } from "./test_util.ts";
import { assert } from "./test_util.ts";
unitTest(async function metrics() {
Deno.test(async function metrics() {
// Write to stdout to ensure a "data" message gets sent instead of just
// control messages.
const dataMsg = new Uint8Array([13, 13, 13]); // "\r\r\r",
@ -39,7 +39,7 @@ unitTest(async function metrics() {
assert(m2OpWrite.bytesReceived === m1OpWrite.bytesReceived);
});
unitTest(
Deno.test(
{ permissions: { write: true } },
function metricsUpdatedIfNoResponseSync() {
const filename = Deno.makeTempDirSync() + "/test.txt";
@ -53,7 +53,7 @@ unitTest(
},
);
unitTest(
Deno.test(
{ permissions: { write: true } },
async function metricsUpdatedIfNoResponseAsync() {
const filename = Deno.makeTempDirSync() + "/test.txt";
@ -69,7 +69,7 @@ unitTest(
);
// Test that ops from extensions have metrics (via OpMiddleware)
unitTest(function metricsForOpCrates() {
Deno.test(function metricsForOpCrates() {
const _ = new URL("https://deno.land");
const m1 = Deno.metrics().ops["op_url_parse"];