Skip to content

Commit 0fb8e0b

Browse files
committed
♻️ Remove redundant tests (#1526)
1 parent 33f15c6 commit 0fb8e0b

File tree

3 files changed

+7
-420
lines changed

3 files changed

+7
-420
lines changed

src/test/lib/utils/contest.test.ts

Lines changed: 0 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -350,30 +350,6 @@ describe('Contest', () => {
350350

351351
describe('get contest name label', () => {
352352
describe('AtCoder', () => {
353-
describe('when contest_id contains abc', () => {
354-
TestCasesForContestNameLabel.abc.forEach(({ name, value }) => {
355-
runTests(`${name}`, [value], ({ contestId, expected }: TestCaseForContestNameLabel) => {
356-
expect(getContestNameLabel(contestId)).toEqual(expected);
357-
});
358-
});
359-
});
360-
361-
describe('when contest_id starts with APG4b', () => {
362-
TestCasesForContestNameLabel.apg4b.forEach(({ name, value }) => {
363-
runTests(`${name}`, [value], ({ contestId, expected }: TestCaseForContestNameLabel) => {
364-
expect(getContestNameLabel(contestId)).toEqual(expected);
365-
});
366-
});
367-
});
368-
369-
describe('when contest_id is typical90', () => {
370-
TestCasesForContestNameLabel.typical90.forEach(({ name, value }) => {
371-
runTests(`${name}`, [value], ({ contestId, expected }: TestCaseForContestNameLabel) => {
372-
expect(getContestNameLabel(contestId)).toEqual(expected);
373-
});
374-
});
375-
});
376-
377353
describe('when contest_id is dp (EDPC)', () => {
378354
TestCasesForContestNameLabel.edpc.forEach(({ name, value }) => {
379355
runTests(`${name}`, [value], ({ contestId, expected }: TestCaseForContestNameLabel) => {
@@ -422,46 +398,6 @@ describe('Contest', () => {
422398
});
423399
});
424400

425-
describe('when contest_id is tessoku-book', () => {
426-
TestCasesForContestNameLabel.tessokuBook.forEach(({ name, value }) => {
427-
runTests(`${name}`, [value], ({ contestId, expected }: TestCaseForContestNameLabel) => {
428-
expect(getContestNameLabel(contestId)).toEqual(expected);
429-
});
430-
});
431-
});
432-
433-
describe('when contest_id is math-and-algorithm', () => {
434-
TestCasesForContestNameLabel.mathAndAlgorithm.forEach(({ name, value }) => {
435-
runTests(`${name}`, [value], ({ contestId, expected }: TestCaseForContestNameLabel) => {
436-
expect(getContestNameLabel(contestId)).toEqual(expected);
437-
});
438-
});
439-
});
440-
441-
describe('when contest_id contains arc', () => {
442-
TestCasesForContestNameLabel.arc.forEach(({ name, value }) => {
443-
runTests(`${name}`, [value], ({ contestId, expected }: TestCaseForContestNameLabel) => {
444-
expect(getContestNameLabel(contestId)).toEqual(expected);
445-
});
446-
});
447-
});
448-
449-
describe('when contest_id contains agc', () => {
450-
TestCasesForContestNameLabel.agc.forEach(({ name, value }) => {
451-
runTests(`${name}`, [value], ({ contestId, expected }: TestCaseForContestNameLabel) => {
452-
expect(getContestNameLabel(contestId)).toEqual(expected);
453-
});
454-
});
455-
});
456-
457-
describe('when contest_id matches contests held by university students', () => {
458-
TestCasesForContestNameLabel.universities.forEach(({ name, value }) => {
459-
runTests(`${name}`, [value], ({ contestId, expected }: TestCaseForContestNameLabel) => {
460-
expect(getContestNameLabel(contestId)).toEqual(expected);
461-
});
462-
});
463-
});
464-
465401
describe('when contest_id contains chokudai_S', () => {
466402
TestCasesForContestNameLabel.atCoderOthers.forEach(({ name, value }) => {
467403
runTests(`${name}`, [value], ({ contestId, expected }: TestCaseForContestNameLabel) => {
@@ -470,32 +406,6 @@ describe('Contest', () => {
470406
});
471407
});
472408
});
473-
474-
describe('AOJ', () => {
475-
describe('when contest_id means AOJ courses', () => {
476-
TestCasesForContestNameLabel.aojCourses.forEach(({ name, value }) => {
477-
runTests(`${name}`, [value], ({ contestId, expected }: TestCaseForContestNameLabel) => {
478-
expect(getContestNameLabel(contestId)).toEqual(expected);
479-
});
480-
});
481-
});
482-
483-
describe('when contest_id means AOJ PCK (prelim and final)', () => {
484-
TestCasesForContestNameLabel.aojPck.forEach(({ name, value }) => {
485-
runTests(`${name}`, [value], ({ contestId, expected }: TestCaseForContestNameLabel) => {
486-
expect(getContestNameLabel(contestId)).toEqual(expected);
487-
});
488-
});
489-
});
490-
491-
describe('when contest_id means AOJ JAG (prelim and regional)', () => {
492-
TestCasesForContestNameLabel.aojJag.forEach(({ name, value }) => {
493-
runTests(`${name}`, [value], ({ contestId, expected }: TestCaseForContestNameLabel) => {
494-
expect(getContestNameLabel(contestId)).toEqual(expected);
495-
});
496-
});
497-
});
498-
});
499409
});
500410

501411
describe('add contest name to task index', () => {

src/test/lib/utils/test_cases/contest_name_and_task_index.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,13 @@ interface UniversityContestsTestData {
221221
[key: string]: UniversityContestTestData;
222222
}
223223

224+
// Note:
225+
// UTPC contests on AtCoder: 2011-2014 and 2020-2023 (not held during 2015-2019)
226+
// TTPC contests on AtCoder: 2015, 2019, 2022-
227+
// TUPC contests on AtCoder: 2022-
228+
//
229+
// See:
230+
// https://kenkoooo.com/atcoder/resources/contests.json
224231
type UtpcTaskPatterns = {
225232
'2011-2014': string[];
226233
'2020': string[];

0 commit comments

Comments
 (0)