# Instructions

- Following Playwright test failed.
- Explain why, be concise, respect Playwright best practices.
- Provide a snippet of code with the fix, if possible.

# Test info

- Name: tests/ui/sitemap.spec.ts >> sitemap URL validation >> committees sitemap - sample URLs resolve
- Location: tests/ui/sitemap.spec.ts:229:7

# Error details

```
Error: Errors: /committees/sitemap-committees.xml lists 83545 URLs (limit 50000)

expect(received).toHaveLength(expected)

Expected length: 0
Received length: 1
Received array:  ["/committees/sitemap-committees.xml lists 83545 URLs (limit 50000)"]
```

# Page snapshot

```yaml
- generic [active] [ref=f5e1]:
  - banner [ref=f5e2]:
    - heading "JUST LEAD PAC" [level=1] [ref=f5e3]
    - paragraph [ref=f5e4]: PAC - Nonqualified
    - paragraph [ref=f5e5]: "FEC ID: C00631994"
  - generic [ref=f5e6]:
    - heading "Overview" [level=2] [ref=f5e7]
    - generic [ref=f5e8]:
      - term [ref=f5e9]: Committee Type
      - definition [ref=f5e10]: PAC - Nonqualified
      - term [ref=f5e11]: Designation
      - definition [ref=f5e12]: D
      - term [ref=f5e13]: Party Affiliation
      - definition [ref=f5e14]: N/A
      - term [ref=f5e15]: Treasurer
      - definition [ref=f5e16]: CRATE, BRADLEY T
      - term [ref=f5e17]: Location
      - definition [ref=f5e18]:
        - text: BEVERLY,
        - link "Massachusetts" [ref=f5e19] [cursor=pointer]:
          - /url: https://us.elect.info/states/massachusetts/
        - text: "01915"
      - term [ref=f5e20]: Active Cycles
      - definition [ref=f5e21]:
        - link "2018" [ref=f5e22] [cursor=pointer]:
          - /url: https://us.elect.info/elections/2018/
        - text: ","
        - link "2020" [ref=f5e23] [cursor=pointer]:
          - /url: https://us.elect.info/elections/2020/
        - text: ","
        - link "2022" [ref=f5e24] [cursor=pointer]:
          - /url: https://us.elect.info/elections/2022/
        - text: ","
        - link "2024" [ref=f5e25] [cursor=pointer]:
          - /url: https://us.elect.info/elections/2024/
        - text: ","
        - link "2026" [ref=f5e26] [cursor=pointer]:
          - /url: https://us.elect.info/elections/2026/
  - generic [ref=f5e27]:
    - heading "Financial Summary" [level=2] [ref=f5e28]
    - generic [ref=f5e29]:
      - term [ref=f5e30]: Total Receipts
      - definition [ref=f5e31]:
        - strong [ref=f5e32]: $216K
      - term [ref=f5e33]: Total Disbursements
      - definition [ref=f5e34]: $68K
  - generic [ref=f5e35]:
    - heading "Connected Organizations" [level=2] [ref=f5e36]
    - generic [ref=f5e37]:
      - term [ref=f5e38]: Connected Organization
      - definition [ref=f5e39]: JASON LEWIS
  - generic [ref=f5e40]:
    - heading "Candidates Funded" [level=2] [ref=f5e41]
    - paragraph [ref=f5e42]: "Candidates receiving contributions from this committee:"
    - list [ref=f5e43]:
      - listitem [ref=f5e44]:
        - link "MAST, BRIAN" [ref=f5e45] [cursor=pointer]:
          - /url: https://us.elect.info/candidates/house/fl-18/mast-brian/
        - text: $3K (1 contributions)
      - listitem [ref=f5e46]:
        - link "CARTER, JOHN RICE" [ref=f5e47] [cursor=pointer]:
          - /url: https://us.elect.info/candidates/house/tx-31/carter-john-rice/
        - text: $2K (1 contributions)
      - listitem [ref=f5e48]:
        - link "LEWIS, JASON MARK MR." [ref=f5e49] [cursor=pointer]:
          - /url: https://us.elect.info/candidates/house/mn-02/lewis-jason-mark-mr/
        - text: $1K (2 contributions)
      - listitem [ref=f5e50]:
        - link "BERGMAN, JOHN" [ref=f5e51] [cursor=pointer]:
          - /url: https://us.elect.info/candidates/house/mi-01/bergman-john/
        - text: $1K (1 contributions)
      - listitem [ref=f5e52]:
        - link "KNIGHT, STEVE" [ref=f5e53] [cursor=pointer]:
          - /url: https://us.elect.info/candidates/house/ca-25/knight-steve/
        - text: $1K (1 contributions)
      - listitem [ref=f5e54]:
        - link "HANDEL, KAREN CHRISTINE" [ref=f5e55] [cursor=pointer]:
          - /url: https://us.elect.info/candidates/house/ga-06/handel-karen-christine/
        - text: $500 (1 contributions)
      - listitem [ref=f5e56]:
        - link "LESKO, DEBBIE" [ref=f5e57] [cursor=pointer]:
          - /url: https://us.elect.info/candidates/house/az-08/lesko-debbie/
        - text: $500 (1 contributions)
    - paragraph [ref=f5e58]: Showing 7 of 7
  - generic [ref=f5e59]:
    - heading "Committees Funded" [level=2] [ref=f5e60]
    - paragraph [ref=f5e61]: "Committees receiving transfers from this committee:"
    - list [ref=f5e62]:
      - listitem [ref=f5e63]:
        - link "JASON LEWIS FOR SENATE" [ref=f5e64] [cursor=pointer]:
          - /url: https://us.elect.info/committees/pac-qual/jason-lewis-for-senate-c00716860/
        - text: $152K (2 transfers)
      - listitem [ref=f5e65]:
        - link "INDEPENDENT-REPUBLICANS OF MINNESOTA" [ref=f5e66] [cursor=pointer]:
          - /url: https://us.elect.info/committees/party/independent-republicans-of-minnesota-c00001313/
        - text: $10K (1 transfers)
      - listitem [ref=f5e67]:
        - link "MINNESOTA VICTORY FUND" [ref=f5e68] [cursor=pointer]:
          - /url: https://us.elect.info/committees/pac/minnesota-victory-fund-c00680207/
        - text: $9K (4 transfers)
      - listitem [ref=f5e69]:
        - link "KOCH INDUSTRIES INC POLITICAL ACTION COMMITTEE (KOCHPAC)" [ref=f5e70] [cursor=pointer]:
          - /url: https://us.elect.info/committees/pac-qual/koch-industries-inc-political-action-committee-kochpac-c00236489/
        - text: $5K (1 transfers)
      - listitem [ref=f5e71]:
        - link "NRCC" [ref=f5e72] [cursor=pointer]:
          - /url: https://us.elect.info/committees/party/nrcc-c00075820/
        - text: $5K (1 transfers)
      - listitem [ref=f5e73]:
        - link "LOCKHEED MARTIN CORPORATION EMPLOYEES' POLITICAL ACTION COMMITTEE" [ref=f5e74] [cursor=pointer]:
          - /url: https://us.elect.info/committees/pac-qual/lockheed-martin-corporation-employees-political-action-committee-c00303024/
        - text: $4K (2 transfers)
      - listitem [ref=f5e75]:
        - link "XCEL ENERGY EMPLOYEE POLITICAL ACTION COMMITTEE" [ref=f5e76] [cursor=pointer]:
          - /url: https://us.elect.info/committees/pac-qual/xcel-energy-employee-political-action-committee-c00107771/
        - text: $4K (2 transfers)
      - listitem [ref=f5e77]:
        - link "POLARIS POLITICAL ACTION COMMITTEE" [ref=f5e78] [cursor=pointer]:
          - /url: https://us.elect.info/committees/pac-qual/polaris-political-action-committee-c00279497/
        - text: $3K (1 transfers)
      - listitem [ref=f5e79]:
        - link "NUCLEAR ENERGY INSTITUTE FEDERAL POLITICAL ACTION COMMITTEE" [ref=f5e80] [cursor=pointer]:
          - /url: https://us.elect.info/committees/pac-qual/nuclear-energy-institute-federal-political-action-committee-c00239848/
        - text: $3K (1 transfers)
      - listitem [ref=f5e81]:
        - link "MOTORCYCLE PAC OF MINNESOTA" [ref=f5e82] [cursor=pointer]:
          - /url: https://us.elect.info/committees/pac/motorcycle-pac-of-minnesota-c00402768/
        - text: $2K (2 transfers)
      - listitem [ref=f5e83]:
        - link "NAVIENT CORPORATION PAC (NAVIENT PAC)" [ref=f5e84] [cursor=pointer]:
          - /url: https://us.elect.info/committees/pac-qual/navient-corporation-pac-navient-pac-c00331835/
        - text: $2K (4 transfers)
      - listitem [ref=f5e85]:
        - link "JASON LEWIS FOR CONGRESS" [ref=f5e86] [cursor=pointer]:
          - /url: https://us.elect.info/committees/house/jason-lewis-for-congress-c00589234/
        - text: $2K (1 transfers)
      - listitem [ref=f5e87]:
        - link "LEWIS VICTORY FUND" [ref=f5e88] [cursor=pointer]:
          - /url: https://us.elect.info/committees/pac/lewis-victory-fund-c00632000/
        - text: $1K (1 transfers)
      - listitem [ref=f5e89]:
        - link "EMERSON POLITICAL ACTION COMMITTEE (EMPAC)" [ref=f5e90] [cursor=pointer]:
          - /url: https://us.elect.info/committees/pac-qual/emerson-political-action-committee-empac-c00080515/
        - text: $1K (1 transfers)
      - listitem [ref=f5e91]:
        - link "SECOND CONGRESSIONAL DISTRICT REPUBLICAN PARTY OF MINNESOTA" [ref=f5e92] [cursor=pointer]:
          - /url: https://us.elect.info/committees/party/second-congressional-district-republican-party-of-minnesota-c00453076/
        - text: $750 (1 transfers)
      - listitem [ref=f5e93]:
        - link "NATIONAL AIR TRAFFIC CONTROLLERS ASSOCIATION PAC" [ref=f5e94] [cursor=pointer]:
          - /url: https://us.elect.info/committees/pac-qual/national-air-traffic-controllers-association-pac-c00238725/
        - text: $500 (1 transfers)
    - paragraph [ref=f5e95]: Showing 16 of 16
  - generic [ref=f5e96]:
    - heading "Funded By" [level=2] [ref=f5e97]
    - paragraph [ref=f5e98]: "Committees that have transferred funds to this committee:"
    - list [ref=f5e99]:
      - listitem [ref=f5e100]:
        - link "JASON LEWIS FOR SENATE" [ref=f5e101] [cursor=pointer]:
          - /url: https://us.elect.info/committees/pac-qual/jason-lewis-for-senate-c00716860/
        - text: $152K (2 transfers)
      - listitem [ref=f5e102]:
        - link "INDEPENDENT-REPUBLICANS OF MINNESOTA" [ref=f5e103] [cursor=pointer]:
          - /url: https://us.elect.info/committees/party/independent-republicans-of-minnesota-c00001313/
        - text: $10K (1 transfers)
      - listitem [ref=f5e104]:
        - link "MINNESOTA VICTORY FUND" [ref=f5e105] [cursor=pointer]:
          - /url: https://us.elect.info/committees/pac/minnesota-victory-fund-c00680207/
        - text: $9K (4 transfers)
      - listitem [ref=f5e106]:
        - link "NRCC" [ref=f5e107] [cursor=pointer]:
          - /url: https://us.elect.info/committees/party/nrcc-c00075820/
        - text: $5K (1 transfers)
      - listitem [ref=f5e108]:
        - link "KOCH INDUSTRIES INC POLITICAL ACTION COMMITTEE (KOCHPAC)" [ref=f5e109] [cursor=pointer]:
          - /url: https://us.elect.info/committees/pac-qual/koch-industries-inc-political-action-committee-kochpac-c00236489/
        - text: $5K (1 transfers)
      - listitem [ref=f5e110]:
        - link "LOCKHEED MARTIN CORPORATION EMPLOYEES' POLITICAL ACTION COMMITTEE" [ref=f5e111] [cursor=pointer]:
          - /url: https://us.elect.info/committees/pac-qual/lockheed-martin-corporation-employees-political-action-committee-c00303024/
        - text: $4K (2 transfers)
      - listitem [ref=f5e112]:
        - link "XCEL ENERGY EMPLOYEE POLITICAL ACTION COMMITTEE" [ref=f5e113] [cursor=pointer]:
          - /url: https://us.elect.info/committees/pac-qual/xcel-energy-employee-political-action-committee-c00107771/
        - text: $4K (2 transfers)
      - listitem [ref=f5e114]:
        - link "THE SCHWAN FOOD COMPANY POLITICAL ACTION COMMITEE" [ref=f5e115] [cursor=pointer]:
          - /url: https://us.elect.info/committees/pac-qual/the-schwan-food-company-political-action-commitee-c00360362/
        - text: $3K (2 transfers)
      - listitem [ref=f5e116]:
        - link "MAST FOR CONGRESS" [ref=f5e117] [cursor=pointer]:
          - /url: https://us.elect.info/committees/house/mast-for-congress-c00632257/
        - text: $3K (1 transfers)
      - listitem [ref=f5e118]:
        - link "NUCLEAR ENERGY INSTITUTE FEDERAL POLITICAL ACTION COMMITTEE" [ref=f5e119] [cursor=pointer]:
          - /url: https://us.elect.info/committees/pac-qual/nuclear-energy-institute-federal-political-action-committee-c00239848/
        - text: $3K (1 transfers)
      - listitem [ref=f5e120]:
        - link "POLARIS POLITICAL ACTION COMMITTEE" [ref=f5e121] [cursor=pointer]:
          - /url: https://us.elect.info/committees/pac-qual/polaris-political-action-committee-c00279497/
        - text: $3K (1 transfers)
      - listitem [ref=f5e122]:
        - link "MOTORCYCLE PAC OF MINNESOTA" [ref=f5e123] [cursor=pointer]:
          - /url: https://us.elect.info/committees/pac/motorcycle-pac-of-minnesota-c00402768/
        - text: $2K (2 transfers)
      - listitem [ref=f5e124]:
        - link "JOHN CARTER FOR CONGRESS" [ref=f5e125] [cursor=pointer]:
          - /url: https://us.elect.info/committees/house/john-carter-for-congress-c00371203/
        - text: $2K (1 transfers)
      - listitem [ref=f5e126]:
        - link "NAVIENT CORPORATION PAC (NAVIENT PAC)" [ref=f5e127] [cursor=pointer]:
          - /url: https://us.elect.info/committees/pac-qual/navient-corporation-pac-navient-pac-c00331835/
        - text: $2K (2 transfers)
      - listitem [ref=f5e128]:
        - link "LEWIS VICTORY FUND" [ref=f5e129] [cursor=pointer]:
          - /url: https://us.elect.info/committees/pac/lewis-victory-fund-c00632000/
        - text: $1K (1 transfers)
      - listitem [ref=f5e130]:
        - link "BERGMANFORCONGRESS" [ref=f5e131] [cursor=pointer]:
          - /url: https://us.elect.info/committees/house/bergmanforcongress-c00614214/
        - text: $1K (1 transfers)
      - listitem [ref=f5e132]:
        - link "JASON LEWIS FOR CONGRESS" [ref=f5e133] [cursor=pointer]:
          - /url: https://us.elect.info/committees/house/jason-lewis-for-congress-c00589234/
        - text: $1K (2 transfers)
      - listitem [ref=f5e134]:
        - link "STEVE KNIGHT FOR CONGRESS" [ref=f5e135] [cursor=pointer]:
          - /url: https://us.elect.info/committees/house/steve-knight-for-congress-c00554014/
        - text: $1K (1 transfers)
      - listitem [ref=f5e136]:
        - link "EMERSON POLITICAL ACTION COMMITTEE (EMPAC)" [ref=f5e137] [cursor=pointer]:
          - /url: https://us.elect.info/committees/pac-qual/emerson-political-action-committee-empac-c00080515/
        - text: $1K (1 transfers)
      - listitem [ref=f5e138]:
        - link "NATIONAL AIR TRAFFIC CONTROLLERS ASSOCIATION PAC" [ref=f5e139] [cursor=pointer]:
          - /url: https://us.elect.info/committees/pac-qual/national-air-traffic-controllers-association-pac-c00238725/
        - text: $500 (1 transfers)
    - paragraph [ref=f5e140]: Showing 20 of 20
  - contentinfo [ref=f5e141]:
    - paragraph [ref=f5e142]:
      - link "elect.info" [ref=f5e143] [cursor=pointer]:
        - /url: https://us.elect.info/
      - text: "| Data from"
      - link "Federal Election Commission" [ref=f5e144] [cursor=pointer]:
        - /url: https://www.fec.gov/
      - text: "| Generated 2026-01-16"
```

# Test source

```ts
  145 | 
  146 |   if (isSitemapIndex(xml)) {
  147 |     // This is a sitemap index - sample child sitemaps and recurse
  148 |     console.log(`${indent}Detected sitemap index, sampling ${CHILD_SITEMAP_SAMPLE_SIZE} child sitemaps`);
  149 | 
  150 |     const childSitemaps = getRandomItems(urls, CHILD_SITEMAP_SAMPLE_SIZE, sitemapPath);
  151 |     for (const childUrl of childSitemaps) {
  152 |       const childPath = toRelativePath(childUrl);
  153 |       console.log(`${indent}Processing child sitemap: ${childPath}`);
  154 | 
  155 |       const childResult = await testSitemapUrls(page, baseUrl, childPath, depth + 1);
  156 |       result.tested += childResult.tested;
  157 |       result.errors.push(...childResult.errors);
  158 |     }
  159 |   } else {
  160 |     // This is a regular sitemap with page URLs - sample and test
  161 |     const sampleUrls = getRandomItems(urls, SAMPLE_SIZE, sitemapPath);
  162 | 
  163 |     for (const url of sampleUrls) {
  164 |       const path = toRelativePath(url);
  165 | 
  166 |       // Check if this URL is itself a sitemap (nested sitemap within urlset)
  167 |       if (isSitemapUrl(url)) {
  168 |         console.log(`${indent}Found nested sitemap URL: ${path}`);
  169 |         const nestedResult = await testSitemapUrls(page, baseUrl, path, depth + 1);
  170 |         result.tested += nestedResult.tested;
  171 |         result.errors.push(...nestedResult.errors);
  172 |       } else {
  173 |         // Regular page URL - verify it loads
  174 |         console.log(`${indent}Testing page: ${path}`);
  175 |         const pageResponse = await page.goto(path, { timeout: PAGE_TIMEOUT });
  176 |         result.tested++;
  177 | 
  178 |         if (pageResponse?.status() !== 200) {
  179 |           const error = `Expected 200 for ${path}, got ${pageResponse?.status()}`;
  180 |           console.log(`${indent}  ERROR: ${error}`);
  181 |           result.errors.push(error);
  182 |         } else {
  183 |           // Verify page has content
  184 |           const h1Visible = await page.locator('h1').isVisible().catch(() => false);
  185 |           if (!h1Visible) {
  186 |             const error = `Page ${path} loaded but has no visible h1`;
  187 |             console.log(`${indent}  WARNING: ${error}`);
  188 |             // Don't treat missing h1 as hard failure, just log it
  189 |           }
  190 |         }
  191 |       }
  192 |     }
  193 |   }
  194 | 
  195 |   console.log(`${indent}Tested ${result.tested} URLs from ${sitemapPath}`);
  196 |   return result;
  197 | }
  198 | 
  199 | test.describe('sitemap URL validation', () => {
  200 | 
  201 |   test('sitemap index loads and contains child sitemaps', async ({ page }) => {
  202 |     const response = await page.goto('/sitemap.xml');
  203 |     expect(response?.status()).toBe(200);
  204 | 
  205 |     const content = await page.content();
  206 |     expect(content).toContain('sitemapindex');
  207 |     expect(content).toContain('sitemap-candidates.xml');
  208 |   });
  209 | 
  210 |   test('candidates sitemap - sample URLs resolve', async ({ page }) => {
  211 |     test.setTimeout(120000);
  212 | 
  213 |     // Navigate to a simple page first so we have a page context for fetch
  214 |     await page.goto('/');
  215 |     const baseUrl = new URL(page.url()).origin;
  216 | 
  217 |     const result = await testSitemapUrls(page, baseUrl, '/candidates/sitemap-candidates.xml');
  218 | 
  219 |     if (result.tested === 0 && !STRICT) {
  220 |       test.skip();
  221 |       return;
  222 |     }
  223 |     expect(result.tested, `sitemap sampled no URLs; errors: ${result.errors.join(', ')}`).toBeGreaterThan(0);
  224 | 
  225 |     console.log(`Tested ${result.tested} URLs from candidates sitemap`);
  226 |     expect(result.errors, `Errors: ${result.errors.join(', ')}`).toHaveLength(0);
  227 |   });
  228 | 
  229 |   test('committees sitemap - sample URLs resolve', async ({ page }) => {
  230 |     test.setTimeout(120000);
  231 | 
  232 |     // Navigate to a simple page first so we have a page context for fetch
  233 |     await page.goto('/');
  234 |     const baseUrl = new URL(page.url()).origin;
  235 | 
  236 |     const result = await testSitemapUrls(page, baseUrl, '/committees/sitemap-committees.xml');
  237 | 
  238 |     if (result.tested === 0 && !STRICT) {
  239 |       test.skip();
  240 |       return;
  241 |     }
  242 |     expect(result.tested, `sitemap sampled no URLs; errors: ${result.errors.join(', ')}`).toBeGreaterThan(0);
  243 | 
  244 |     console.log(`Tested ${result.tested} URLs from committees sitemap`);
> 245 |     expect(result.errors, `Errors: ${result.errors.join(', ')}`).toHaveLength(0);
      |                                                                  ^ Error: Errors: /committees/sitemap-committees.xml lists 83545 URLs (limit 50000)
  246 |   });
  247 | 
  248 |   test('parties sitemap - sample URLs resolve', async ({ page }) => {
  249 |     await page.goto('/');
  250 |     const baseUrl = new URL(page.url()).origin;
  251 | 
  252 |     const result = await testSitemapUrls(page, baseUrl, '/parties/sitemap-parties.xml');
  253 | 
  254 |     if (result.tested === 0 && !STRICT) {
  255 |       test.skip();
  256 |       return;
  257 |     }
  258 |     expect(result.tested, `sitemap sampled no URLs; errors: ${result.errors.join(', ')}`).toBeGreaterThan(0);
  259 | 
  260 |     console.log(`Tested ${result.tested} URLs from parties sitemap`);
  261 |     expect(result.errors, `Errors: ${result.errors.join(', ')}`).toHaveLength(0);
  262 |   });
  263 | 
  264 |   test('offices sitemap - sample URLs resolve', async ({ page }) => {
  265 |     await page.goto('/');
  266 |     const baseUrl = new URL(page.url()).origin;
  267 | 
  268 |     const result = await testSitemapUrls(page, baseUrl, '/offices/sitemap-offices.xml');
  269 | 
  270 |     if (result.tested === 0 && !STRICT) {
  271 |       test.skip();
  272 |       return;
  273 |     }
  274 |     expect(result.tested, `sitemap sampled no URLs; errors: ${result.errors.join(', ')}`).toBeGreaterThan(0);
  275 | 
  276 |     console.log(`Tested ${result.tested} URLs from offices sitemap`);
  277 |     expect(result.errors, `Errors: ${result.errors.join(', ')}`).toHaveLength(0);
  278 |   });
  279 | 
  280 |   test('districts sitemap - sample URLs resolve', async ({ page }) => {
  281 |     await page.goto('/');
  282 |     const baseUrl = new URL(page.url()).origin;
  283 | 
  284 |     const result = await testSitemapUrls(page, baseUrl, '/districts/sitemap-districts.xml');
  285 | 
  286 |     if (result.tested === 0 && !STRICT) {
  287 |       test.skip();
  288 |       return;
  289 |     }
  290 |     expect(result.tested, `sitemap sampled no URLs; errors: ${result.errors.join(', ')}`).toBeGreaterThan(0);
  291 | 
  292 |     console.log(`Tested ${result.tested} URLs from districts sitemap`);
  293 |     expect(result.errors, `Errors: ${result.errors.join(', ')}`).toHaveLength(0);
  294 |   });
  295 | 
  296 |   test('states sitemap - sample URLs resolve', async ({ page }) => {
  297 |     await page.goto('/');
  298 |     const baseUrl = new URL(page.url()).origin;
  299 | 
  300 |     const result = await testSitemapUrls(page, baseUrl, '/states/sitemap-states.xml');
  301 | 
  302 |     if (result.tested === 0 && !STRICT) {
  303 |       test.skip();
  304 |       return;
  305 |     }
  306 |     expect(result.tested, `sitemap sampled no URLs; errors: ${result.errors.join(', ')}`).toBeGreaterThan(0);
  307 | 
  308 |     console.log(`Tested ${result.tested} URLs from states sitemap`);
  309 |     expect(result.errors, `Errors: ${result.errors.join(', ')}`).toHaveLength(0);
  310 |   });
  311 | 
  312 |   test('elections sitemap - sample URLs resolve', async ({ page }) => {
  313 |     await page.goto('/');
  314 |     const baseUrl = new URL(page.url()).origin;
  315 | 
  316 |     const result = await testSitemapUrls(page, baseUrl, '/elections/sitemap-elections.xml');
  317 | 
  318 |     if (result.tested === 0 && !STRICT) {
  319 |       test.skip();
  320 |       return;
  321 |     }
  322 |     expect(result.tested, `sitemap sampled no URLs; errors: ${result.errors.join(', ')}`).toBeGreaterThan(0);
  323 | 
  324 |     console.log(`Tested ${result.tested} URLs from elections sitemap`);
  325 |     expect(result.errors, `Errors: ${result.errors.join(', ')}`).toHaveLength(0);
  326 |   });
  327 | 
  328 | });
  329 | 
```