mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
apparently there is no need for this
This commit is contained in:
@@ -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);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user