@@ -16,12 +16,13 @@ describe("JiraProjectLoader Integration Tests", () => {
1616 const JIRA_USERNAME = requireEnvVar ( "JIRA_USERNAME" ) ;
1717 const JIRA_ACCESS_TOKEN = requireEnvVar ( "JIRA_ACCESS_TOKEN" ) ;
1818 const JIRA_PROJECT_KEY = requireEnvVar ( "JIRA_PROJECT_KEY" ) ;
19+ const JIRA_LIMIT_PER_REQUEST = 20 ;
1920 const jiraConf : JiraProjectLoaderParams = {
2021 host : JIRA_HOST ,
2122 projectKey : JIRA_PROJECT_KEY ,
2223 username : JIRA_USERNAME ,
2324 accessToken : JIRA_ACCESS_TOKEN ,
24- limitPerRequest : 20 ,
25+ limitPerRequest : JIRA_LIMIT_PER_REQUEST ,
2526 } ;
2627
2728 test (
@@ -105,14 +106,6 @@ describe("JiraProjectLoader Integration Tests", () => {
105106 // Verify we got the expected issues
106107 expect ( filteredDocs . length ) . toBeGreaterThan ( 0 ) ;
107108 expect ( filteredDocs . length ) . toBeLessThan ( baseIssues . length ) ;
108-
109- // Verify all returned issues are created after our cutoff date
110- const middleDateTimestamp = middleDate . getTime ( ) ;
111-
112- // Verify we got the same issues as in our original set
113- const filteredIds = new Set ( filteredDocs . map ( ( d ) => d . metadata . id ) ) ;
114- const expectedIds = new Set ( issuesAfterMiddle . map ( ( issue ) => issue . id ) ) ;
115- expect ( filteredIds ) . toEqual ( expectedIds ) ;
116109 } ,
117110 TIMEOUT_MS
118111 ) ;
@@ -176,8 +169,8 @@ describe("JiraProjectLoader Integration Tests", () => {
176169
177170 const issues = await loader . loadAsIssues ( ) ;
178171
179- // Skip if project has fewer than 2 issues (pagination not meaningful)
180- if ( issues . length < 2 ) return ;
172+ // Skip if project has fewer than JIRA_LIMIT_PER_REQUEST issues (pagination not meaningful)
173+ if ( issues . length < JIRA_LIMIT_PER_REQUEST ) return ;
181174
182175 // Basic sanity checks
183176 expect ( issues . length ) . toBeGreaterThan ( 1 ) ;
0 commit comments