feat: release version 1.0.7
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
import assert from 'node:assert/strict';
|
||||
import { readFile } from 'node:fs/promises';
|
||||
import test from 'node:test';
|
||||
|
||||
type SpecialLevel = {
|
||||
description: string;
|
||||
effect: string;
|
||||
};
|
||||
|
||||
type CardSummary = {
|
||||
cards: Array<{
|
||||
name: string;
|
||||
details: { special: SpecialLevel[] };
|
||||
}>;
|
||||
};
|
||||
|
||||
test('스페셜 설명의 추가 효과가 요약 데이터에서 누락되지 않는다', async () => {
|
||||
const path = new URL('../data/cards-summary.json', import.meta.url);
|
||||
const summary = JSON.parse(await readFile(path, 'utf8')) as CardSummary;
|
||||
const additionalEffectMarkers = ['스킬 발동률', 'GOOD 이상이 PERFECT가 된다', '라이프가'];
|
||||
const missing = summary.cards.flatMap((card) => card.details.special.flatMap((level) =>
|
||||
additionalEffectMarkers
|
||||
.filter((marker) => level.description.includes(marker) && !level.effect.includes(marker))
|
||||
.map((marker) => `${card.name} (${marker}): ${level.description}`)));
|
||||
|
||||
assert.deepEqual(missing, []);
|
||||
});
|
||||
Reference in New Issue
Block a user