Skip to content

Comments

Fix test import pattern to match actual usage in App.tsx#2340

Draft
Copilot wants to merge 5 commits intouser/bchoudhury/refactor-mainfrom
copilot/sub-pr-2296-again
Draft

Fix test import pattern to match actual usage in App.tsx#2340
Copilot wants to merge 5 commits intouser/bchoudhury/refactor-mainfrom
copilot/sub-pr-2296-again

Conversation

Copy link
Contributor

Copilot AI commented Jan 21, 2026

The test file imported updateStyles as a named export while App.tsx uses a namespace import, creating a mismatch that could lead to false positives.

Changes

  • Updated App.test.tsx to use namespace import pattern: import * as StyleConstants
  • Updated mock reference from jest.mocked(updateStyles) to jest.mocked(StyleConstants.updateStyles)

Context

// App.tsx (actual usage)
import * as StyleConstants from "../Common/StyleConstants";
StyleConstants.updateStyles();

// App.test.tsx (was)
import { updateStyles } from "../Common/StyleConstants";

// App.test.tsx (now)
import * as StyleConstants from "../Common/StyleConstants";

Test now accurately reflects production code usage pattern.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

BChoudhury-ms and others added 4 commits January 21, 2026 16:00
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Initial plan

* Remove redundant test cases from Root.test.tsx

Co-authored-by: BChoudhury-ms <201893606+BChoudhury-ms@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: BChoudhury-ms <201893606+BChoudhury-ms@users.noreply.github.com>
Co-authored-by: BChoudhury-ms <201893606+BChoudhury-ms@users.noreply.github.com>
Copilot AI changed the title [WIP] Address feedback on root component refactor and test coverage Fix test import pattern to match actual usage in App.tsx Jan 21, 2026
Copilot AI requested a review from BChoudhury-ms January 21, 2026 10:44
@BChoudhury-ms BChoudhury-ms force-pushed the user/bchoudhury/refactor-main branch from f316d6e to f894c6c Compare January 21, 2026 17:11
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.

2 participants