mirror of
https://github.com/zkldi/Tachi.git
synced 2026-10-10 00:08:22 +03:00
Fix bug where EXG was rejected in prudence validation
This commit is contained in:
@@ -3,12 +3,29 @@ import db from "external/mongo/db";
|
||||
import CreateLogCtx from "lib/logger/logger";
|
||||
import t from "tap";
|
||||
import ResetDBState from "test-utils/resets";
|
||||
import { GetKTDataJSON, TestingAlbidaADV, TestingSDVXAlbidaSong } from "test-utils/test-data";
|
||||
import { TestingAlbidaADV, TestingSDVXAlbidaSong } from "test-utils/test-data";
|
||||
import { ConvertAPIKaiSDVX, ConvertDifficulty, ConvertVersion, ResolveKaiLamp } from "./converter";
|
||||
|
||||
const logger = CreateLogCtx(__filename);
|
||||
|
||||
const sdvxScore = GetKTDataJSON("./api-kai/sdvx-score.json");
|
||||
const sdvxScore = {
|
||||
sdvx_id: 32157055,
|
||||
music_id: 1,
|
||||
music_difficulty: 1,
|
||||
played_version: 6, // exg
|
||||
clear_type: 2,
|
||||
max_chain: 179,
|
||||
score: 9310699,
|
||||
critical: 1754,
|
||||
near: 112,
|
||||
error: 78,
|
||||
early: 70,
|
||||
late: 42,
|
||||
gauge_type: 0,
|
||||
gauge_rate: 90,
|
||||
timestamp: "2020-08-30T13:08:11Z",
|
||||
_id: 127108,
|
||||
};
|
||||
|
||||
t.test("#ConvertAPIKaiSDVX", (t) => {
|
||||
t.beforeEach(ResetDBState);
|
||||
@@ -59,7 +76,7 @@ t.test("#ConvertAPIKaiSDVX", (t) => {
|
||||
logger
|
||||
),
|
||||
{
|
||||
message: /Could not find chart with songID 0 \(ADV - Version heaven\)/u,
|
||||
message: /Could not find chart with songID 0 \(ADV - Version exceed\)/u,
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ import { KaiContext, KaiSDVXScore } from "../types";
|
||||
const PR_KaiSDVXScore = {
|
||||
music_id: p.isPositiveInteger,
|
||||
music_difficulty: p.isBoundedInteger(0, 4),
|
||||
played_version: p.isBoundedInteger(1, 5),
|
||||
played_version: p.isBoundedInteger(1, 6),
|
||||
clear_type: p.isBoundedInteger(1, 5),
|
||||
max_chain: p.isPositiveInteger,
|
||||
score: p.isBoundedInteger(0, 10_000_000),
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
"gw",
|
||||
"heaven",
|
||||
"vivid",
|
||||
"exceed",
|
||||
"konaste"
|
||||
],
|
||||
"tierlistInfo": {}
|
||||
|
||||
@@ -271,7 +271,7 @@ export const TestingAlbidaADV: ChartDocument<"sdvx:Single"> = {
|
||||
arcChartID: "EOZ7FixCDpv",
|
||||
},
|
||||
isPrimary: true,
|
||||
versions: ["booth", "inf", "gw", "heaven", "vivid", "konaste"],
|
||||
versions: ["booth", "inf", "gw", "heaven", "vivid", "exceed", "konaste"],
|
||||
tierlistInfo: {},
|
||||
};
|
||||
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
{
|
||||
"chart_id": 3848,
|
||||
"music_id": 1000,
|
||||
"music_difficulty": 2,
|
||||
"play_style": "SINGLE",
|
||||
"difficulty": "ANOTHER",
|
||||
"iidx_id": 35247879,
|
||||
"version_played": 26,
|
||||
"lamp": 5,
|
||||
"ex_score": 1570,
|
||||
"grade": "AA",
|
||||
"miss_count": 24,
|
||||
"fast_count": null,
|
||||
"slow_count": null,
|
||||
"timestamp": "2020-10-31T19:10:50Z",
|
||||
"_id": 189232
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
{
|
||||
"sdvx_id": 32157055,
|
||||
"music_id": 1,
|
||||
"music_difficulty": 1,
|
||||
"played_version": 4,
|
||||
"clear_type": 2,
|
||||
"max_chain": 179,
|
||||
"score": 9310699,
|
||||
"critical": 1754,
|
||||
"near": 112,
|
||||
"error": 78,
|
||||
"early": 70,
|
||||
"late": 42,
|
||||
"gauge_type": 0,
|
||||
"gauge_rate": 90,
|
||||
"timestamp": "2020-08-30T13:08:11Z",
|
||||
"_id": 127108
|
||||
}
|
||||
Reference in New Issue
Block a user