Skip to content

Fix test failures in PR #9190: Set.intersection and ResizeObserver compatibility#9191

Draft
Copilot wants to merge 7 commits intomasterfrom
copilot/fix-test-failure-issue
Draft

Fix test failures in PR #9190: Set.intersection and ResizeObserver compatibility#9191
Copilot wants to merge 7 commits intomasterfrom
copilot/fix-test-failure-issue

Conversation

Copy link

Copilot AI commented Jan 30, 2026

PR #9190 replaces react-lazylog with @melloware/react-logviewer but fails tests due to ES2025 Set.intersection() usage and missing ResizeObserver in jsdom.

Changes

Replace Set.intersection() with compatible implementation (ui/helpers/filter.js)

  • Set.prototype.intersection() unavailable in Node v20.20
  • Manually count intersection size to replicate behavior:
// Before (ES2025)
new Set(arr1).intersection(new Set(arr2)).size === arr1.length

// After (compatible)
let intersectionSize = 0;
for (const item of set1) {
  if (set2.has(item)) intersectionSize++;
}
return intersectionSize === arr1.length;

Add ResizeObserver mock (tests/ui/test-setup.js)

  • @melloware/react-logviewer requires ResizeObserver
  • jsdom doesn't provide it; added minimal mock with constructor signature

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • circleci.com
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 6 commits January 30, 2026 00:10
…ation and add ResizeObserver mock

Co-authored-by: Archaeopteryx <216576+Archaeopteryx@users.noreply.github.com>
…stomizations

In production, the default CSS rules have a higher priority than
the custom ones without this adjustment.
Co-authored-by: Archaeopteryx <216576+Archaeopteryx@users.noreply.github.com>
Co-authored-by: Archaeopteryx <216576+Archaeopteryx@users.noreply.github.com>
…ver mock

Co-authored-by: Archaeopteryx <216576+Archaeopteryx@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix test failure in pull request 9190 Fix test failures in PR #9190: Set.intersection and ResizeObserver compatibility Jan 30, 2026
Copilot AI requested a review from Archaeopteryx January 30, 2026 00:21
@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.09%. Comparing base (e675128) to head (98a3109).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9191      +/-   ##
==========================================
+ Coverage   82.07%   82.09%   +0.01%     
==========================================
  Files         602      602              
  Lines       33794    33800       +6     
  Branches     3070     3069       -1     
==========================================
+ Hits        27737    27747      +10     
- Misses       5741     5927     +186     
+ Partials      316      126     -190     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants