Ref 기본 유니크 풀을 상태 조회·개설·마감에서 공유하고 API와 데몬 양쪽에서 입찰 부위 제한을 재검증한다. 실제 Chromium 및 개설·경쟁 입찰·마감 통합 회귀를 추가한다.
31 lines
1.2 KiB
TypeScript
31 lines
1.2 KiB
TypeScript
import { describe, expect, it } from 'vitest';
|
|
|
|
import { resolveLegacyCompatibleUniqueConfig } from '../src/rewards/legacyUniqueItemPool.js';
|
|
|
|
describe('legacy-compatible unique item pool', () => {
|
|
it.each([undefined, {}, '{}'] as const)('restores the Ref default pool when allItems is %j', async (allItems) => {
|
|
const config = await resolveLegacyCompatibleUniqueConfig(allItems === undefined ? {} : { allItems });
|
|
|
|
expect(Object.keys(config.allItems)).toEqual(['horse', 'weapon', 'book', 'item']);
|
|
expect(config.allItems.weapon?.che_무기_12_칠성검).toBe(2);
|
|
expect(config.allItems.item?.che_의술_청낭서).toBe(1);
|
|
expect(config.allItems.weapon?.che_무기_01_단도).toBeUndefined();
|
|
});
|
|
|
|
it('preserves an explicit scenario pool, including its counts', async () => {
|
|
const config = await resolveLegacyCompatibleUniqueConfig({
|
|
allItems: {
|
|
weapon: {
|
|
che_무기_12_칠성검: 7,
|
|
},
|
|
},
|
|
});
|
|
|
|
expect(config.allItems).toEqual({
|
|
weapon: {
|
|
che_무기_12_칠성검: 7,
|
|
},
|
|
});
|
|
});
|
|
});
|