Skip to content

fix: repair PortfolioPage test mocks and add missing jsdom polyfills#2

Open
team2human wants to merge 2 commits intoed-donner:mainfrom
team2human:polecat/quartz-mnyqcjge
Open

fix: repair PortfolioPage test mocks and add missing jsdom polyfills#2
team2human wants to merge 2 commits intoed-donner:mainfrom
team2human:polecat/quartz-mnyqcjge

Conversation

@team2human
Copy link
Copy Markdown

Summary

  • Fix lightweight-charts mock to use addSeries + LineSeries export (matching actual v5 API used in MainChart.tsx)
  • Add addEventListener/removeEventListener to MockEventSource (required by useMarketData hook)
  • Add ResizeObserver polyfill to test setup (jsdom doesn't implement it, needed by MainChart)

Test plan

  • npm test — all 37 tests pass (was 4 failures before fix)
  • npm run build — static export succeeds
  • npm run lint — clean

Closes fin-31f6

🤖 Generated with Claude Code

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.

1 participant