kt-template-online-api/test/qqbot/plugins/bangDream/tsugu/list-rarity-spec.spec.ts

22 lines
754 B
TypeScript

import {
BANGDREAM_RARITY_LIST_SPEC,
shouldUseTrainedRarityStar,
} from '@/qqbot/plugins/bangDream/tsugu/render-blocks/list-rarity-spec';
describe('BangDream rarity list spec', () => {
it('keeps the historical rarity list text size and spacing stable', () => {
expect(BANGDREAM_RARITY_LIST_SPEC.list).toEqual({
spacing: 0,
textSize: 50,
});
});
it('keeps the trained star threshold stable', () => {
expect(BANGDREAM_RARITY_LIST_SPEC.trainedStar.minRarity).toBe(4);
expect(shouldUseTrainedRarityStar(3, true)).toBe(false);
expect(shouldUseTrainedRarityStar(4, true)).toBe(true);
expect(shouldUseTrainedRarityStar(5, true)).toBe(true);
expect(shouldUseTrainedRarityStar(4, false)).toBe(false);
});
});