mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-03-20 12:11:28 -07:00
fix: align texthooker and stats formatting with CI expectations
This commit is contained in:
@@ -146,15 +146,18 @@ test('extractSessionEventNoteInfo ignores malformed notes without a numeric note
|
||||
});
|
||||
|
||||
test('mergeSessionEventNoteInfos keys previews by both requested and returned note ids', () => {
|
||||
const noteInfos = mergeSessionEventNoteInfos([111], [
|
||||
{
|
||||
noteId: 222,
|
||||
fields: {
|
||||
Expression: { value: '呪い' },
|
||||
Sentence: { value: 'この剣は呪いだ' },
|
||||
const noteInfos = mergeSessionEventNoteInfos(
|
||||
[111],
|
||||
[
|
||||
{
|
||||
noteId: 222,
|
||||
fields: {
|
||||
Expression: { value: '呪い' },
|
||||
Sentence: { value: 'この剣は呪いだ' },
|
||||
},
|
||||
},
|
||||
},
|
||||
]);
|
||||
],
|
||||
);
|
||||
|
||||
assert.deepEqual(noteInfos.get(111), {
|
||||
noteId: 222,
|
||||
|
||||
@@ -237,17 +237,16 @@ export function collectPendingSessionEventNoteIds(
|
||||
return next;
|
||||
}
|
||||
|
||||
export function getSessionEventCardRequest(
|
||||
marker: SessionChartMarker | null,
|
||||
): { noteIds: number[]; requestKey: string | null } {
|
||||
export function getSessionEventCardRequest(marker: SessionChartMarker | null): {
|
||||
noteIds: number[];
|
||||
requestKey: string | null;
|
||||
} {
|
||||
if (!marker || marker.kind !== 'card' || marker.noteIds.length === 0) {
|
||||
return { noteIds: [], requestKey: null };
|
||||
}
|
||||
|
||||
const noteIds = Array.from(
|
||||
new Set(
|
||||
marker.noteIds.filter((noteId) => Number.isInteger(noteId) && noteId > 0),
|
||||
),
|
||||
new Set(marker.noteIds.filter((noteId) => Number.isInteger(noteId) && noteId > 0)),
|
||||
);
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user