mirror of
https://github.com/zkldi/Tachi.git
synced 2026-09-30 19:07:58 +03:00
test todos
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
import t from "tap";
|
||||
import { CreateImportLoggerAndID } from "./import-logger";
|
||||
import { PublicUserDocument } from "kamaitachi-common";
|
||||
import { Logger } from "winston";
|
||||
|
||||
t.test("#CreateImportLoggerAndID", (t) => {
|
||||
let { importID, logger } = CreateImportLoggerAndID(
|
||||
{ username: "foo", id: 1 } as PublicUserDocument,
|
||||
"file/csv:eamusement-iidx"
|
||||
);
|
||||
|
||||
t.match(importID, /^[a-f0-9]{40}$/u, "Should return a 40 character importID.");
|
||||
|
||||
// not possible to automate this, probably.
|
||||
logger.info(
|
||||
"Namespaced log test - if this does not have 'file/csv:eamusement-iidx | foo (#1)' next to it, it's broke."
|
||||
);
|
||||
|
||||
t.end();
|
||||
});
|
||||
@@ -0,0 +1,12 @@
|
||||
import t from "tap";
|
||||
import { CloseMongoConnection } from "../../../db/db";
|
||||
import ResetDBState from "../../../test-utils/reset-db-state";
|
||||
import { UpdateUsersMilestones } from "./milestones";
|
||||
|
||||
t.todo("#UpdateUsersMilestones", (t) => {
|
||||
t.beforeEach(ResetDBState);
|
||||
|
||||
t.end();
|
||||
});
|
||||
|
||||
t.teardown(CloseMongoConnection);
|
||||
@@ -0,0 +1,6 @@
|
||||
import t from "tap";
|
||||
import { HydrateScore } from "./hydrate-score";
|
||||
|
||||
t.todo("#HydrateScore", (t) => {
|
||||
t.end();
|
||||
});
|
||||
@@ -5,7 +5,6 @@ import {
|
||||
ScoreDocument,
|
||||
AnySongDocument,
|
||||
} from "kamaitachi-common";
|
||||
import { Logger } from "winston";
|
||||
import { DryScore, KtLogger } from "../../../types";
|
||||
import { CreateCalculatedData } from "../calculated-data/calculated-data";
|
||||
|
||||
@@ -14,7 +13,7 @@ import { CreateCalculatedData } from "../calculated-data/calculated-data";
|
||||
* @param dryScore The intermediate score to make into a real score.
|
||||
* @param userID The userID this score is for.
|
||||
*/
|
||||
export default async function HydrateScore(
|
||||
export async function HydrateScore(
|
||||
userID: integer,
|
||||
dryScore: DryScore,
|
||||
chart: AnyChartDocument,
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
import t from "tap";
|
||||
import { ImportAllIterableData, ImportIterableDatapoint } from "./score-importing";
|
||||
|
||||
t.todo("#ImportAllIterableData", (t) => {
|
||||
t.end();
|
||||
});
|
||||
|
||||
t.todo("#ImportIterableDatapoint", (t) => {
|
||||
t.end();
|
||||
});
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
AnySongDocument,
|
||||
} from "kamaitachi-common";
|
||||
import { DryScore, ConverterFunction, ConverterFnReturn, KtLogger } from "../../../types";
|
||||
import HydrateScore from "./hydrate-score";
|
||||
import { HydrateScore } from "./hydrate-score";
|
||||
import { InsertQueue, QueueScoreInsert, ScoreIDs } from "./insert-score";
|
||||
import {
|
||||
ConverterFailure,
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
import t from "tap";
|
||||
import { GenerateRandomSessionName } from "./name-generation";
|
||||
|
||||
t.test("#GenerateRandomSessionName", (t) => {
|
||||
let res = GenerateRandomSessionName();
|
||||
|
||||
t.type(res, "string", "Should return a string.");
|
||||
|
||||
t.end();
|
||||
});
|
||||
@@ -0,0 +1,6 @@
|
||||
import t from "tap";
|
||||
import { CreateSessionCalcData } from "./performance-calc";
|
||||
|
||||
t.todo("#CreateSessionCalcData", (t) => {
|
||||
t.end();
|
||||
});
|
||||
@@ -0,0 +1,10 @@
|
||||
import t from "tap";
|
||||
import { CreateSessions, LoadScoresIntoSessions } from "./sessions";
|
||||
|
||||
t.todo("#CreateSessions", (t) => {
|
||||
t.end();
|
||||
});
|
||||
|
||||
t.todo("#LoadScoresIntoSessions", (t) => {
|
||||
t.end();
|
||||
});
|
||||
Reference in New Issue
Block a user