Hoist t.teardown calls to the single-process-tap script

This commit is contained in:
zkldi
2021-08-26 03:42:06 +01:00
parent 97cb89793a
commit 8aabc33adf
98 changed files with 4 additions and 193 deletions
-2
View File
@@ -26,5 +26,3 @@ t.test("ID field autoprojection", async (t) => {
t.end();
});
t.teardown(CloseAllConnections);
-2
View File
@@ -12,5 +12,3 @@ t.test("Basic PUB/SUB testing", (t) => {
RedisPub("test" as any, { userID: 1 } as any);
});
t.teardown(CloseRedisPubSub);
-1
View File
@@ -310,4 +310,3 @@ t.test("#HumaniseGoalProgress", (t) => {
t.end();
});
t.teardown(CloseAllConnections);
-2
View File
@@ -151,5 +151,3 @@ t.test("#CDNRedirect", (t) => {
t.end();
});
t.teardown(CloseAllConnections);
@@ -31,5 +31,3 @@ t.test("#CreateGameSettings", (t) => {
t.end();
});
t.teardown(CloseAllConnections);
-2
View File
@@ -54,5 +54,3 @@ t.test("#ChangeRootLogLevel", (t) => {
t.end();
});
t.teardown(CloseAllConnections);
@@ -382,5 +382,3 @@ t.test("#CalculateDataForGamePT", (t) => {
t.end();
});
t.teardown(CloseAllConnections);
@@ -509,5 +509,3 @@ t.test("#CalculateLampRating", (t) => {
t.end();
});
t.teardown(CloseAllConnections);
@@ -18,5 +18,3 @@ t.test("#CreateImportLoggerAndID", (t) => {
t.end();
});
t.teardown(CloseAllConnections);
@@ -421,5 +421,3 @@ t.test("#ProcessGoal", (t) => {
t.end();
});
t.teardown(CloseAllConnections);
@@ -353,5 +353,3 @@ t.test("#UpdateUsersMilestones", (t) => {
t.end();
});
t.teardown(CloseAllConnections);
@@ -242,5 +242,3 @@ t.test("#ReprocessOrphan", (t) => {
t.end();
});
t.teardown(CloseAllConnections);
@@ -168,5 +168,3 @@ t.test("#CreatePBDoc", (t) => {
t.end();
});
t.teardown(CloseAllConnections);
@@ -58,5 +58,3 @@ t.test("#ProcessPBs", (t) => {
t.end();
});
t.teardown(CloseAllConnections);
@@ -105,5 +105,3 @@ t.test("#QueueScoreInsert, #InsertQueue", async (t) => {
t.end();
});
t.teardown(CloseAllConnections);
@@ -93,5 +93,3 @@ t.test("#CreateScoreID", (t) => {
t.end();
});
t.teardown(CloseAllConnections);
@@ -444,5 +444,3 @@ t.test("#LoadScoresIntoSessions", (t) => {
t.end();
});
t.teardown(CloseAllConnections);
@@ -135,5 +135,3 @@ t.test("#CalculateClassDeltas", (t) => {
t.end();
});
t.teardown(CloseAllConnections);
@@ -71,5 +71,3 @@ t.test("#CalculateRatings", (t) => {
t.end();
});
t.teardown(CloseAllConnections);
@@ -205,5 +205,3 @@ t.test("#UpdateUsersGamePlaytypeStats", (t) => {
t.end();
});
t.teardown(CloseAllConnections);
@@ -143,5 +143,3 @@ t.test("#CreateArcIIDXClassHandler", (t) => {
t.end();
});
t.teardown(CloseAllConnections);
@@ -91,5 +91,3 @@ t.test("#ResolveARCIIDXLamp", (t) => {
t.end();
});
t.teardown(CloseAllConnections);
@@ -66,5 +66,3 @@ t.test("#ParseArcIIDX", (t) => {
t.end();
});
t.teardown(CloseAllConnections);
@@ -93,5 +93,3 @@ t.test("#ResolveARCSDVXLamp", (t) => {
t.end();
});
t.teardown(CloseAllConnections);
@@ -66,5 +66,3 @@ t.test("#ParseArcSDVX", (t) => {
t.end();
});
t.teardown(CloseAllConnections);
@@ -174,5 +174,3 @@ t.test("#CreateKaiIIDXClassHandler", async (t) => {
t.end();
});
t.teardown(CloseAllConnections);
@@ -91,5 +91,3 @@ t.test("#ConvertAPIKaiIIDX", (t) => {
t.end();
});
t.teardown(CloseAllConnections);
@@ -83,5 +83,3 @@ t.test("#ParseKaiIIDX", (t) => {
t.end();
});
t.teardown(CloseAllConnections);
@@ -127,5 +127,3 @@ t.test("#CreateKaiReauthFunction", (t) => {
t.end();
});
t.teardown(CloseAllConnections);
@@ -145,5 +145,3 @@ t.test("#CreateKaiSDVXClassHandler", async (t) => {
t.end();
});
t.teardown(CloseAllConnections);
@@ -125,5 +125,3 @@ t.test("#ResolveKaiLamp", (t) => {
t.end();
});
t.teardown(CloseAllConnections);
@@ -83,5 +83,3 @@ t.test("#ParseKaiSDVX", (t) => {
t.end();
});
t.teardown(CloseAllConnections);
@@ -201,5 +201,3 @@ t.test("#TraverseKaiAPI", (t) => {
t.end();
});
t.teardown(CloseAllConnections);
@@ -380,5 +380,3 @@ t.test("#ConverterFn", (t) => {
t.end();
});
t.teardown(CloseAllConnections);
@@ -462,5 +462,3 @@ t.test("#ParserFn", (t) => {
t.end();
});
t.teardown(CloseAllConnections);
@@ -30,5 +30,3 @@ t.todo("#ConverterFn", (t) => {
t.end();
});
t.teardown(CloseAllConnections);
@@ -300,5 +300,3 @@ t.test("#ParseEamusementCSV", (t) => {
t.end();
});
t.teardown(CloseAllConnections);
@@ -135,5 +135,3 @@ t.test("#ConvertFileMerIIDX", (t) => {
t.end();
});
t.teardown(CloseAllConnections);
@@ -141,5 +141,3 @@ t.test("#ParseMerIIDX", (t) => {
t.end();
});
t.teardown(CloseAllConnections);
@@ -226,5 +226,3 @@ t.test("#ResolveS3Lamp", (t) => {
t.end();
});
t.teardown(CloseAllConnections);
@@ -223,5 +223,3 @@ t.test("#ParseSolidStateXML", (t) => {
t.end();
});
t.teardown(CloseAllConnections);
@@ -112,5 +112,3 @@ t.test("#ConverterIRBarbatos", (t) => {
t.end();
});
t.teardown(CloseAllConnections);
@@ -32,5 +32,3 @@ t.test("#ParseBarbatosSingle", (t) => {
t.end();
});
t.teardown(CloseAllConnections);
@@ -63,5 +63,3 @@ t.test("#FerStaticClassHandler", (t) => {
t.end();
});
t.teardown(CloseAllConnections);
@@ -180,5 +180,3 @@ t.test("#ParseFervidexStatic", (t) => {
t.end();
});
t.teardown(CloseAllConnections);
@@ -245,5 +245,3 @@ t.test("#ConverterIRFervidex", (t) => {
t.end();
});
t.teardown(CloseAllConnections);
@@ -122,5 +122,3 @@ t.test("#ConverterIRUSC", (t) => {
t.end();
});
t.teardown(CloseAllConnections);
@@ -36,5 +36,3 @@ t.test("#ParseIRUSC", (t) => {
t.end();
});
t.teardown(CloseAllConnections);
-2
View File
@@ -60,5 +60,3 @@ t.test("#SearchUsersRegExp", (t) => {
t.end();
});
t.teardown(CloseAllConnections);
@@ -92,5 +92,3 @@ t.test("#EvaluateShowcaseStat", (t) => {
t.end();
});
t.teardown(CloseAllConnections);
@@ -124,5 +124,3 @@ t.test("#EvalulateUsersStatsShowcase", (t) => {
t.end();
});
t.teardown(CloseAllConnections);
@@ -115,5 +115,3 @@ t.test("#SetRequestPermissions", (t) => {
t.end();
});
t.teardown(CloseAllConnections);
@@ -58,5 +58,3 @@ t.test("POST /api/v1/admin/change-log-level", async (t) => {
t.end();
});
t.teardown(CloseAllConnections);
@@ -72,5 +72,3 @@ t.test("#ValidateCaptcha", async (t) => {
t.end();
});
t.teardown(CloseAllConnections);
@@ -274,5 +274,3 @@ t.test("POST /api/v1/auth/register", (t) => {
t.end();
});
t.teardown(CloseAllConnections);
@@ -162,5 +162,3 @@ t.test("GET /api/v1/games/:game/:playtype/charts/:chartID/tierlist", (t) => {
t.end();
});
t.teardown(CloseAllConnections);
@@ -70,5 +70,3 @@ t.test("GET /api/v1/games/:game/:playtype/charts", (t) => {
t.end();
});
t.teardown(CloseAllConnections);
@@ -139,5 +139,3 @@ t.test("GET /api/v1/games/:game/:playtype/folders/:folderID/tierlist", (t) => {
t.end();
});
t.teardown(CloseAllConnections);
@@ -98,5 +98,3 @@ t.test("GET /api/v1/games/:game/:playtype/leaderboard", (t) => {
t.end();
});
t.teardown(CloseAllConnections);
@@ -40,5 +40,3 @@ t.test("GET /api/v1/games/:game/:playtype/songs/:songID", (t) => {
t.end();
});
t.teardown(CloseAllConnections);
@@ -49,5 +49,3 @@ t.test("GET /api/v1/games/:game/:playtype/tables/:tableID", (t) => {
t.end();
});
t.teardown(CloseAllConnections);
@@ -22,5 +22,3 @@ t.test("GET /api/v1/games/:game", (t) => {
t.end();
});
t.teardown(CloseAllConnections);
@@ -16,5 +16,3 @@ t.test("GET /api/v1/games", async (t) => {
t.end();
});
t.teardown(CloseAllConnections);
@@ -331,5 +331,3 @@ t.test("POST /api/v1/import/file", async (t) => {
t.end();
});
t.teardown(CloseAllConnections);
@@ -38,5 +38,3 @@ t.test("404 Handler", async (t) => {
t.end();
});
t.teardown(CloseAllConnections);
@@ -175,5 +175,3 @@ t.test("PATCH /api/v1/scores/:scoreID", (t) => {
t.end();
});
t.teardown(CloseAllConnections);
@@ -41,5 +41,3 @@ t.test("GET /api/v1/search", (t) => {
t.end();
});
t.teardown(CloseAllConnections);
@@ -201,5 +201,3 @@ t.test("PATCH /api/v1/sessions/:sessionID", (t) => {
t.end();
});
t.teardown(CloseAllConnections);
@@ -79,5 +79,3 @@ t.test("POST /api/v1/status", async (t) => {
t.end();
});
t.teardown(CloseAllConnections);
@@ -73,5 +73,3 @@ t.test("PUT /api/v1/users/:userID/banner", (t) => {
t.end();
});
t.teardown(CloseAllConnections);
@@ -123,5 +123,3 @@ t.test("GET /api/v1/users/:userID/games/:game/:playtype/folders/:folderID/timeli
t.end();
});
t.teardown(CloseAllConnections);
@@ -175,5 +175,3 @@ t.test("GET /api/v1/users/:userID/games/:game/:playtype/pbs/:chartID", (t) => {
t.end();
});
t.teardown(CloseAllConnections);
@@ -328,5 +328,3 @@ t.test("GET /api/v1/users/:userID/games/:game/:playtype/most-played", (t) => {
t.end();
});
t.teardown(CloseAllConnections);
@@ -202,5 +202,3 @@ t.test("GET /api/v1/users/:userID/games/:game/:playtype/scores/:chartID", (t) =>
t.end();
});
t.teardown(CloseAllConnections);
@@ -180,5 +180,3 @@ t.test("GET /api/v1/users/:userID/games/:game/:playtype/sessions/recent", (t) =>
t.end();
});
t.teardown(CloseAllConnections);
@@ -152,5 +152,3 @@ t.test("PATCH /api/v1/users/:userID/games/:game/:playtype/settings", (t) => {
t.end();
});
t.teardown(CloseAllConnections);
@@ -408,5 +408,3 @@ t.test("PUT /api/v1/users/:userID/games/:game/:playtype/showcase", (t) => {
t.end();
});
t.teardown(CloseAllConnections);
@@ -43,5 +43,3 @@ t.test("GET /api/v1/users/:userID/games/:game/:playtype/tables/:tableID", (t) =>
t.end();
});
t.teardown(CloseAllConnections);
@@ -176,5 +176,3 @@ t.test("PATCH /api/v1/users/:userID/integrations/arc", async (t) => {
t.end();
});
t.teardown(CloseAllConnections);
@@ -64,5 +64,3 @@ t.test("GET /api/v1/users/:userID/integrations/kai/:kaiType", async (t) => {
// test is currently undoable due to issues with mocking out real Fetch calls.
t.todo("PATCH /api/v1/userse/:userID/integrations/kai/:kaiType/oauth2callback");
t.teardown(CloseAllConnections);
@@ -74,5 +74,3 @@ t.test("PUT /api/v1/users/:userID/pfp", (t) => {
t.end();
});
t.teardown(CloseAllConnections);
@@ -312,5 +312,3 @@ t.test("GET /api/v1/users/:userID/game-stats", (t) => {
t.end();
});
t.teardown(CloseAllConnections);
@@ -73,5 +73,3 @@ t.test("GET /api/v1/users", (t) => {
t.end();
});
t.teardown(CloseAllConnections);
@@ -41,5 +41,3 @@ t.test("POST /ir/barbatos/score/submit", async (t) => {
t.end();
});
t.teardown(CloseAllConnections);
@@ -46,5 +46,3 @@ t.test("#ValidateIRClientVersion", (t) => {
t.end();
});
t.teardown(CloseAllConnections);
@@ -187,5 +187,3 @@ t.test("#TachiPBScoreToBeatorajaFormat", (t) => {
t.end();
});
t.teardown(CloseAllConnections);
@@ -55,5 +55,3 @@ t.test("GET /ir/beatoraja/charts/:chartSHA256/scores", (t) => {
t.end();
});
t.teardown(CloseAllConnections);
@@ -392,5 +392,3 @@ t.test("POST /ir/beatoraja/submit-course", (t) => {
t.end();
});
t.teardown(CloseAllConnections);
@@ -65,5 +65,3 @@ t.test("POST /ir/chunitachi/import", (t) => {
t.end();
});
t.teardown(CloseAllConnections);
@@ -59,5 +59,3 @@ t.test("POST /ir/direct-manual/import", async (t) => {
t.end();
});
t.teardown(CloseAllConnections);
@@ -339,5 +339,3 @@ t.test("POST /ir/fervidex/profile/submit", (t) => {
t.end();
});
t.teardown(CloseAllConnections);
@@ -456,5 +456,3 @@ t.test("POST /replays", (t) => {
t.end();
});
t.teardown(CloseAllConnections);
@@ -410,5 +410,3 @@ t.test("#CreatePOSTScoresResponseBody", async (t) => {
t.end();
});
t.teardown(CloseAllConnections);
@@ -1,5 +1,7 @@
import glob from "glob";
import path from "path";
import t from "tap";
import { CloseAllConnections } from "./close-connections";
const files = glob.sync(path.join(__dirname, "../../", "**/*.test.ts"));
@@ -8,3 +10,5 @@ process.env.NODE_PATH = path.join(__dirname, "../../");
for (const file of files) {
require(file);
}
t.teardown(CloseAllConnections);
-2
View File
@@ -52,5 +52,3 @@ t.test("#DecrementCounterValue", (t) => {
t.end();
});
t.teardown(CloseAllConnections);
-2
View File
@@ -199,5 +199,3 @@ t.test("#GetFolderChartIDs", (t) => {
t.end();
});
t.teardown(CloseAllConnections);
-2
View File
@@ -29,5 +29,3 @@ t.test("#GetScoresFromSession", async (t) => {
t.end();
});
t.teardown(CloseAllConnections);
-2
View File
@@ -89,5 +89,3 @@ t.test("#FormatUserDoc", (t) => {
t.end();
});
t.teardown(CloseAllConnections);