refactor: remove live legacy bracket mode

This commit is contained in:
dahyeon committed 2026-07-12 20:05:25 +00:00
1 parent 78a2c7cf0d
commit 575cd911cb
4 files changed
+55 -6

No files matched your search

@@ -0,0 +1,33 @@
import 'reflect-metadata';
import { plainToInstance } from 'class-transformer';
import { validateSync } from 'class-validator';
import { CreateMatchDto } from './create-match.dto';
describe('CreateMatchDto game mode cutover', () => {
it('rejects the removed live bracket mode', () => {
const dto = plainToInstance(CreateMatchDto, {
title: 'legacy bracket',
scheduledAt: '2026-07-13T10:00:00.000Z',
gameMode: 'bracket',
});
expect(validateSync(dto)).toEqual(
expect.arrayContaining([
expect.objectContaining({ property: 'gameMode' }),
]),
);
});
it.each(['pair', 'round-robin', 'double-elimination'] as const)(
'accepts the live %s mode',
(gameMode) => {
const dto = plainToInstance(CreateMatchDto, {
title: 'Competition',
scheduledAt: '2026-07-13T10:00:00.000Z',
gameMode,
});
expect(validateSync(dto)).toEqual([]);
},
);
});