From b544f3c4f40b880785ebeca62ceacbec8ebe5a4e Mon Sep 17 00:00:00 2001 From: Leonardo Venturini Date: Thu, 9 May 2024 08:02:47 -0400 Subject: [PATCH] apparently there is no need for this --- packages/tinytest/tinytest.js | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/packages/tinytest/tinytest.js b/packages/tinytest/tinytest.js index df07096232..73be02c9f8 100644 --- a/packages/tinytest/tinytest.js +++ b/packages/tinytest/tinytest.js @@ -671,20 +671,6 @@ export class TestRun { } } -function asyncTest(fn) { - return asyncTestRunner; - - async function asyncTestRunner(test, done) { - await fn(test, done); - - done(); - } -} - -function isAsyncFunction(fn) { - return fn?.constructor?.name === "AsyncFunction"; -} - /******************************************************************************/ /* Public API */ /******************************************************************************/ @@ -693,10 +679,6 @@ export const Tinytest = {}; globalThis.__Tinytest = Tinytest; Tinytest.addAsync = function (name, func, options) { - if (isAsyncFunction(func)) { - func = asyncTest(func); - } - TestManager.addCase(new TestCase(name, func), options); };