Vitest 3 optimizing#524
Merged
karancs06 merged 59 commits intodevelop_v4from Dec 3, 2025
Merged
Conversation
…entAddButton - Add microtask wait for Preact component rendering in variant icon test - Add microtask wait for button generation loops (5 buttons) to complete - Fixes 2 remaining timeout failures All tests now passing locally with optimized performance
- Added mock for getFieldVariantStatus() with correct BASE_VARIANT_STATUS structure - Added mock for FIELD_LOCATION_DATA postMessage event to prevent hanging - Fixed visualBuilderPostMessage.send() mock to handle all event types properly - Reverted test timeout back to 30s (root cause was missing mocks, not timeout) - Tests that were timing out at 30s+ now complete in 5-20s each - All 813 tests passing locally in ~94 seconds
…eep() calls - Removed 7 artificial delays (sleep(0) and setTimeout(0)) - Buttons are appended synchronously to DOM, no need to wait - Test duration: 44s → 9s locally (80% improvement) - Expected CI improvement: ~7 minutes saved (based on 13x slowdown factor) Changes: - Replaced 'await sleep(0)' with direct synchronous DOM queries - Replaced 'await new Promise(resolve => setTimeout(resolve, 0))' with synchronous queries - Added clarifying comments that buttons are appended synchronously All 20 tests still pass. Optimization is safe and maintains test integrity.
Coverage Report
File CoverageNo changed files found. |
hiteshshetty-dev
requested changes
Nov 26, 2025
2439176 to
59e65fb
Compare
3bb444c to
5c7b09e
Compare
8769d9d to
3fc25d1
Compare
hiteshshetty-dev
requested changes
Dec 2, 2025
ce71525 to
b0b88cd
Compare
6593a0c to
79834ad
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
optimizing