From 9969b5d8627a1993db9892df2e1d2eb39bcd1109 Mon Sep 17 00:00:00 2001 From: zkldi Date: Tue, 22 Jun 2021 17:32:51 +0100 Subject: [PATCH] buncha test fixes --- .../import-types/api/arc-ddr/converter.test.ts | 3 +-- .../common/batch-manual/parser.test.ts | 16 ++++++++-------- server/src/test-utils/mock-db/tierlist-data.json | 14 ++++++++++++++ 3 files changed, 23 insertions(+), 10 deletions(-) diff --git a/server/src/lib/score-import/import-types/api/arc-ddr/converter.test.ts b/server/src/lib/score-import/import-types/api/arc-ddr/converter.test.ts index 700ff70a9..aae593c13 100644 --- a/server/src/lib/score-import/import-types/api/arc-ddr/converter.test.ts +++ b/server/src/lib/score-import/import-types/api/arc-ddr/converter.test.ts @@ -31,7 +31,7 @@ t.test("#ConvertAPIArcDDR", (t) => { scoreData: { grade: "AAA", percent: 99.976, - score: 807, + score: 999760, judgements: { marvelous: 236, perfect: 24, @@ -46,7 +46,6 @@ t.test("#ConvertAPIArcDDR", (t) => { fast: 10, slow: 14, maxCombo: 260, - exScore: 807, }, lamp: "PERFECT FULL COMBO", }, diff --git a/server/src/lib/score-import/import-types/common/batch-manual/parser.test.ts b/server/src/lib/score-import/import-types/common/batch-manual/parser.test.ts index f74602582..77f29c3d0 100644 --- a/server/src/lib/score-import/import-types/common/batch-manual/parser.test.ts +++ b/server/src/lib/score-import/import-types/common/batch-manual/parser.test.ts @@ -24,7 +24,7 @@ const baseBatchManual = { const baseBatchManualScore = { score: 1000, lamp: "HARD CLEAR", - matchType: "songID", + matchType: "tachiSongID", identifier: "123", difficulty: "ANOTHER", }; @@ -185,7 +185,7 @@ t.test("#ParserFn", (t) => { { score: 1000, lamp: "HARD CLEAR", - matchType: "songID", + matchType: "tachiSongID", identifier: "123", difficulty: "ANOTHER", }, @@ -205,7 +205,7 @@ t.test("#ParserFn", (t) => { { score: 1000, lamp: "HARD CLEAR", - matchType: "title", + matchType: "songTitle", identifier: "5.1.1.", }, ], @@ -227,7 +227,7 @@ t.test("#ParserFn", (t) => { { score: 1000, lamp: "HARD CLEAR", - matchType: "songID", + matchType: "tachiSongID", identifier: "123", difficulty: "ANOTHER", }, @@ -247,7 +247,7 @@ t.test("#ParserFn", (t) => { { score: 1000, lamp: "HARD CLEAR", - matchType: "title", + matchType: "songtitle", identifier: "5.1.1.", }, ], @@ -275,7 +275,7 @@ t.test("#ParserFn", (t) => { { score: 1000, lamp: "HARD CLEAR", - matchType: "songID", + matchType: "tachiSongID", identifier: "123", difficulty: "ANOTHER", hitMeta: { @@ -310,7 +310,7 @@ t.test("#ParserFn", (t) => { { score: 1000, lamp: "HARD CLEAR", - matchType: "songID", + matchType: "tachiSongID", identifier: "123", difficulty: "ANOTHER", judgements: { @@ -337,7 +337,7 @@ t.test("#ParserFn", (t) => { { score: 1000, lamp: "ALL JUSTICE", // not an iidx lamp - matchType: "songID", + matchType: "tachiSongID", identifier: "123", difficulty: "ANOTHER", }, diff --git a/server/src/test-utils/mock-db/tierlist-data.json b/server/src/test-utils/mock-db/tierlist-data.json index d9a0a3954..fe412ffb4 100644 --- a/server/src/test-utils/mock-db/tierlist-data.json +++ b/server/src/test-utils/mock-db/tierlist-data.json @@ -12,5 +12,19 @@ "key": "HARD CLEAR", "tierlistID": "ee9b756e50cff8282091102257b01f423ef855f2", "type": "lamp" + }, + { + "tierlistDataID": "ce915895169642b143c450efca070947546bfe1d4863c27bd4301b34505f4a68", + "chartID": "c2311194e3897ddb5745b1760d2c0141f933e683", + "data": { + "humanised": "F", + "value": 10.0, + "flags": { + "Individual Difference": false + } + }, + "key": "CLEAR", + "tierlistID": "ee9b756e50cff8282091102257b01f423ef855f2", + "type": "lamp" } ] \ No newline at end of file