-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: add unit test for assets polling loops #28646
Conversation
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
Builds ready [e5f3894]
Page Load Metrics (1996 ± 86 ms)
Bundle size diffs
|
5c5b246
to
71fce30
Compare
beforeEach(() => { | ||
// Mock process.env.PORTFOLIO_VIEW | ||
originalPortfolioView = process.env.PORTFOLIO_VIEW; | ||
process.env.PORTFOLIO_VIEW = 'true'; // Set your desired mock value here | ||
|
||
mockPromises = []; | ||
jest.clearAllMocks(); | ||
}); | ||
|
||
afterEach(() => { | ||
// Restore the original value | ||
process.env.PORTFOLIO_VIEW = originalPortfolioView; | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will these need to be removed once we nuke the feature flag from the codebase?
}); | ||
|
||
it('should poll token detection for chain IDs when enabled and stop on dismount', async () => { | ||
process.env.PORTFOLIO_VIEW = 'true'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
beforeEach(() => { | ||
// Mock process.env.PORTFOLIO_VIEW | ||
originalPortfolioView = process.env.PORTFOLIO_VIEW; | ||
process.env.PORTFOLIO_VIEW = 'true'; // Set your desired mock value here | ||
|
||
mockPromises = []; | ||
jest.clearAllMocks(); | ||
}); | ||
|
||
afterEach(() => { | ||
// Restore the original value | ||
process.env.PORTFOLIO_VIEW = originalPortfolioView; | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And here
Builds ready [71fce30]
Page Load Metrics (1625 ± 46 ms)
Bundle size diffs
|
Description
the goal of this PR is to add unit tests for all multichain assets polling loops
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist