Skip to content

Commit 1b97b95

Browse files
committed
fix: test error
Signed-off-by: sunrabbit123 <[email protected]>
1 parent 1b6f6fd commit 1b97b95

File tree

3 files changed

+118
-60
lines changed

3 files changed

+118
-60
lines changed

src/bill/getBillList.spec.ts

Lines changed: 48 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,31 @@
11
import { describe, it, expect, vi } from 'vitest';
22
import { getBillList } from './getBillList';
33
import { callOpenApi } from '../functional';
4-
import { translatedVariableDictionary } from '../constant';
4+
import {
5+
,
6+
대표발의자,
7+
대표발의자코드,
8+
법사위상정일,
9+
법사위처리결과,
10+
법사위처리일,
11+
법사위회부일,
12+
본회의심의결과,
13+
소관위,
14+
소관위상정일,
15+
소관위처리결과,
16+
소관위처리일,
17+
소관위코드,
18+
소관위회부일,
19+
위원회심사_처리일,
20+
의결일,
21+
의안ID,
22+
의안명,
23+
의안번호,
24+
의안상세정보_URL,
25+
제안일,
26+
제안자,
27+
제안자구분,
28+
} from '../constant';
529

630
vi.mock('../functional', () => ({
731
callOpenApi: vi.fn(),
@@ -50,30 +74,29 @@ describe('getBillList', () => {
5074

5175
expect(bills).toHaveLength(1);
5276
expect(bills[0]).toEqual({
53-
[translatedVariableDictionary['의안ID']]: 'PRC_K2S4R0S4Q3P0L0K9J0J9I5Q7P2Q4O6',
54-
[translatedVariableDictionary['의안번호']]: '2126707',
55-
[translatedVariableDictionary['대']]: '21',
56-
[translatedVariableDictionary['의안명']]: '문화다양성의 보호와 증진에 관한 법률 일부개정법률안',
57-
[translatedVariableDictionary['제안자']]: '이자스민의원 등 10인',
58-
[translatedVariableDictionary['제안자구분']]: '의원',
59-
[translatedVariableDictionary['제안일']]: '2024-05-29',
60-
[translatedVariableDictionary['소관위코드']]: '9700513',
61-
[translatedVariableDictionary['소관위']]: '문화체육관광위원회',
62-
[translatedVariableDictionary['소관위회부일']]: '2024-05-29',
63-
[translatedVariableDictionary['위원회심사_처리일']]: null,
64-
[translatedVariableDictionary['의안상세정보_URL']]:
65-
'https://likms.assembly.go.kr/bill/billDetail.do?billId=PRC_K2S4R0S4Q3P0L0K9J0J9I5Q7P2Q4O6',
66-
[translatedVariableDictionary['대표발의자']]: '이자스민',
67-
[translatedVariableDictionary['법사위처리결과']]: null,
68-
[translatedVariableDictionary['법사위처리일']]: null,
69-
[translatedVariableDictionary['법사위상정일']]: null,
70-
[translatedVariableDictionary['법사위회부일']]: null,
71-
[translatedVariableDictionary['소관위처리결과']]: null,
72-
[translatedVariableDictionary['소관위처리일']]: null,
73-
[translatedVariableDictionary['소관위상정일']]: null,
74-
[translatedVariableDictionary['대표발의자코드']]: 'SZ51175J',
75-
[translatedVariableDictionary['본회의심의결과']]: '임기만료폐기',
76-
[translatedVariableDictionary['의결일']]: '2024-05-29',
77+
[의안ID]: 'PRC_K2S4R0S4Q3P0L0K9J0J9I5Q7P2Q4O6',
78+
[의안번호]: '2126707',
79+
[]: '21',
80+
[의안명]: '문화다양성의 보호와 증진에 관한 법률 일부개정법률안',
81+
[제안자]: '이자스민의원 등 10인',
82+
[제안자구분]: '의원',
83+
[제안일]: '2024-05-29',
84+
[소관위코드]: '9700513',
85+
[소관위]: '문화체육관광위원회',
86+
[소관위회부일]: '2024-05-29',
87+
[위원회심사_처리일]: null,
88+
[의안상세정보_URL]: 'https://likms.assembly.go.kr/bill/billDetail.do?billId=PRC_K2S4R0S4Q3P0L0K9J0J9I5Q7P2Q4O6',
89+
[대표발의자]: '이자스민',
90+
[법사위처리결과]: null,
91+
[법사위처리일]: null,
92+
[법사위상정일]: null,
93+
[법사위회부일]: null,
94+
[소관위처리결과]: null,
95+
[소관위처리일]: null,
96+
[소관위상정일]: null,
97+
[대표발의자코드]: 'SZ51175J',
98+
[본회의심의결과]: '임기만료폐기',
99+
[의결일]: '2024-05-29',
77100
});
78101
});
79102

src/lawmaker/getLawmakerList.spec.ts

Lines changed: 48 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,31 @@
11
import { describe, it, expect, vi } from 'vitest';
22
import { getLawmakerList } from './getLawmakerList';
33
import { callOpenApi } from '../functional';
4-
import { translatedVariableDictionary } from '../constant';
4+
import {
5+
국회의원명,
6+
국회의원영문명,
7+
국회의원이메일주소,
8+
국회의원코드,
9+
국회의원한자명,
10+
국회의원홈페이지URL,
11+
보좌관,
12+
비서,
13+
비서관,
14+
사무실호실,
15+
사진,
16+
생일구분코드,
17+
생일일자,
18+
선거구구분명,
19+
선거구명,
20+
성별,
21+
소속위원회명,
22+
약력,
23+
위원회명,
24+
재선구분명,
25+
전화번호,
26+
정당명,
27+
직책명,
28+
} from '../constant';
529

630
vi.mock('../functional', () => ({
731
callOpenApi: vi.fn(),
@@ -50,29 +74,29 @@ describe('getLawmakerList', () => {
5074

5175
expect(lawmakers).toHaveLength(1);
5276
expect(lawmakers[0]).toEqual({
53-
[translatedVariableDictionary['국회의원코드']]: '1234',
54-
[translatedVariableDictionary['국회의원명']]: 'John Doe',
55-
[translatedVariableDictionary['국회의원한자명']]: '张三',
56-
[translatedVariableDictionary['국회의원영문명']]: 'John Doe',
57-
[translatedVariableDictionary['생일구분코드']]: '1',
58-
[translatedVariableDictionary['생일일자']]: '1990-01-01',
59-
[translatedVariableDictionary['직책명']]: 'Lawmaker',
60-
[translatedVariableDictionary['정당명']]: 'Democratic Party',
61-
[translatedVariableDictionary['선거구명']]: 'District A',
62-
[translatedVariableDictionary['선거구구분명']]: 'District',
63-
[translatedVariableDictionary['위원회명']]: 'Committee A',
64-
[translatedVariableDictionary['소속위원회명']]: 'Committee A',
65-
[translatedVariableDictionary['재선구분명']]: 'First-term',
66-
[translatedVariableDictionary['성별']]: 'Male',
67-
[translatedVariableDictionary['전화번호']]: '123-456-7890',
68-
[translatedVariableDictionary['국회의원이메일주소']]: '[email protected]',
69-
[translatedVariableDictionary['국회의원홈페이지URL']]: 'https://example.com/john-doe',
70-
[translatedVariableDictionary['보좌관']]: 'Jane Smith',
71-
[translatedVariableDictionary['비서관']]: 'Bob Johnson',
72-
[translatedVariableDictionary['비서']]: 'Alice Williams',
73-
[translatedVariableDictionary['약력']]: 'John Doe is a lawmaker.',
74-
[translatedVariableDictionary['사무실호실']]: '123',
75-
[translatedVariableDictionary['사진']]: 'https://example.com/john-doe.jpg',
77+
[국회의원코드]: '1234',
78+
[국회의원명]: 'John Doe',
79+
[국회의원한자명]: '张三',
80+
[국회의원영문명]: 'John Doe',
81+
[생일구분코드]: '1',
82+
[생일일자]: '1990-01-01',
83+
[직책명]: 'Lawmaker',
84+
[정당명]: 'Democratic Party',
85+
[선거구명]: 'District A',
86+
[선거구구분명]: 'District',
87+
[위원회명]: 'Committee A',
88+
[소속위원회명]: 'Committee A',
89+
[재선구분명]: 'First-term',
90+
[성별]: 'Male',
91+
[전화번호]: '123-456-7890',
92+
[국회의원이메일주소]: '[email protected]',
93+
[국회의원홈페이지URL]: 'https://example.com/john-doe',
94+
[보좌관]: 'Jane Smith',
95+
[비서관]: 'Bob Johnson',
96+
[비서]: 'Alice Williams',
97+
[약력]: 'John Doe is a lawmaker.',
98+
[사무실호실]: '123',
99+
[사진]: 'https://example.com/john-doe.jpg',
76100
});
77101
});
78102
it('should return an empty list when no lawmakers are found', async () => {

src/national-assembly/getNationalAssemblySchedule.spec.ts

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,18 @@
11
import { describe, it, expect, vi } from 'vitest';
22
import { getNationalAssemblySchedule } from './getNationalAssemblySchedule';
33
import { callOpenApi } from '../functional';
4-
import { translatedVariableDictionary } from '../constant';
4+
import {
5+
위원회명,
6+
일정_내용,
7+
일정_시간,
8+
일정_일자,
9+
일정_종류,
10+
행사_장소,
11+
행사_주체자,
12+
회의_구분,
13+
회의_차수,
14+
회의_회기,
15+
} from '../constant';
516

617
vi.mock('../functional', () => ({
718
callOpenApi: vi.fn(),
@@ -37,16 +48,16 @@ describe('getNationalAssemblySchedule', () => {
3748

3849
expect(schedules).toHaveLength(1);
3950
expect(schedules[0]).toEqual({
40-
[translatedVariableDictionary['일정_종류']]: 'Meeting',
41-
[translatedVariableDictionary['일정_내용']]: 'Committee Meeting',
42-
[translatedVariableDictionary['일정_일자']]: '2023-05-01',
43-
[translatedVariableDictionary['일정_시간']]: '09:00',
44-
[translatedVariableDictionary['회의_구분']]: 'Regular',
45-
[translatedVariableDictionary['위원회명']]: 'Committee A',
46-
[translatedVariableDictionary['회의_회기']]: '1',
47-
[translatedVariableDictionary['회의_차수']]: '1',
48-
[translatedVariableDictionary['행사_주체자']]: 'National Assembly',
49-
[translatedVariableDictionary['행사_장소']]: 'Room 123',
51+
[일정_종류]: 'Meeting',
52+
[일정_내용]: 'Committee Meeting',
53+
[일정_일자]: '2023-05-01',
54+
[일정_시간]: '09:00',
55+
[회의_구분]: 'Regular',
56+
[위원회명]: 'Committee A',
57+
[회의_회기]: '1',
58+
[회의_차수]: '1',
59+
[행사_주체자]: 'National Assembly',
60+
[행사_장소]: 'Room 123',
5061
});
5162
});
5263

0 commit comments

Comments
 (0)