Skip to content

Commit 268bffb

Browse files
committed
chore: Add missing tests (#3169)
1 parent f6a83bd commit 268bffb

File tree

1 file changed

+18
-12
lines changed

1 file changed

+18
-12
lines changed

src/features/tasks/utils/contest-table/agc_provider.test.ts

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -109,24 +109,30 @@ describe('AGC001OnwardsProvider', () => {
109109

110110
test('expects to handle 5-problem contest pattern (AGC009, AGC074)', () => {
111111
const provider = new AGC001OnwardsProvider(ContestType.AGC);
112-
const agc009Tasks = taskResultsForAGC001OnwardsProvider.filter(
113-
(task) => task.contest_id === 'agc009',
114-
);
115-
const headerIds = provider.getHeaderIdsForTask(agc009Tasks as TaskResults);
116112

117-
expect(agc009Tasks).toHaveLength(5);
118-
expect(headerIds).toEqual(['A', 'B', 'C', 'D', 'E']);
113+
['agc009', 'agc074'].forEach((contestId) => {
114+
const agcTasks = taskResultsForAGC001OnwardsProvider.filter(
115+
(task) => task.contest_id === contestId,
116+
);
117+
const headerIds = provider.getHeaderIdsForTask(agcTasks as TaskResults);
118+
119+
expect(agcTasks).toHaveLength(5);
120+
expect(headerIds).toEqual(['A', 'B', 'C', 'D', 'E']);
121+
});
119122
});
120123

121124
test('expects to handle 6-problem contest pattern (AGC001, AGC002)', () => {
122125
const provider = new AGC001OnwardsProvider(ContestType.AGC);
123-
const agc001Tasks = taskResultsForAGC001OnwardsProvider.filter(
124-
(task) => task.contest_id === 'agc001',
125-
);
126-
const headerIds = provider.getHeaderIdsForTask(agc001Tasks as TaskResults);
127126

128-
expect(agc001Tasks).toHaveLength(6);
129-
expect(headerIds).toEqual(['A', 'B', 'C', 'D', 'E', 'F']);
127+
['agc001', 'agc002'].forEach((contestId) => {
128+
const agc001Tasks = taskResultsForAGC001OnwardsProvider.filter(
129+
(task) => task.contest_id === contestId,
130+
);
131+
const headerIds = provider.getHeaderIdsForTask(agc001Tasks as TaskResults);
132+
133+
expect(agc001Tasks).toHaveLength(6);
134+
expect(headerIds).toEqual(['A', 'B', 'C', 'D', 'E', 'F']);
135+
});
130136
});
131137

132138
test('expects to handle 7-problem contest pattern with F2 (AGC028)', () => {

0 commit comments

Comments
 (0)