Skip to content

CT-2264 NPM Connect | Unit Test Coverage 80%#337

Open
ash-wright123 wants to merge 35 commits into
masterfrom
aw/CT-2264
Open

CT-2264 NPM Connect | Unit Test Coverage 80%#337
ash-wright123 wants to merge 35 commits into
masterfrom
aw/CT-2264

Conversation

@ash-wright123

@ash-wright123 ash-wright123 commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator
Screenshot 2026-06-17 at 4 24 52 PM

@ash-wright123 ash-wright123 self-assigned this Jun 8, 2026
@ash-wright123 ash-wright123 marked this pull request as ready for review June 18, 2026 19:47
@wesrisenmay-mx

Copy link
Copy Markdown
Collaborator

We need to break this into smaller PRs. Given our slow CI/CD probably ~1500 line PRs is the sweet spot. We can do one at a time until we've got all these changes in.

import { STEPS } from 'src/const/Connect'
import PostMessage from 'src/utilities/PostMessage'

vi.mock('src/utilities/PostMessage', () => ({

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general we don't want to be mocking our own stuff. If we can get away with not mocking and still have confidence, then that is ideal. If we must mock, then it should be at the very edge of what we control.

For Requests that's MSW. For packages that we must mock, we mock the package(but we try to find another way first).

For this, you probably need to mock window.parent.postMessage

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