test(@angular/build): prevent flakiness in incremental-watch e2e test - #34070
Merged
alan-agius4 merged 1 commit intoSep 10, 2026
Merged
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a helper function getOutputChunks in the incremental-watch E2E test to filter and work specifically with JS chunk files, updating the test assertions accordingly. The reviewer suggested extracting the duplicated .endsWith('.js') check into a local helper function isChunk to improve maintainability and avoid duplication.
In watch mode, 'Application bundle generation complete.' can be logged before all files have finished being emitted to disk. Sampling 'files.length > 0' initially could capture a partial file count, causing the final count comparison to time out once all assets are fully written. Update the test to only track JavaScript chunk files (.js), which prevents race conditions with unrelated asset emission and directly aligns with the test's intent of verifying chunk addition and removal for dynamic imports.
alan-agius4
force-pushed
the
test/incremental-watch-chunk-count
branch
from
September 10, 2026 13:56
a3fe2cf to
2520ed3
Compare
clydin
approved these changes
Sep 10, 2026
Collaborator
Author
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.
In watch mode,
Application bundle generation complete.can be logged before all files have finished being emitted to disk. Samplingfiles.length > 0initially could capture a partial file count, causing the final count comparison to time out once all assets (like sourcemaps, icons, etc.) are fully written.This change updates the test to only track JavaScript chunk files (
.js), preventing race conditions with unrelated asset emission and directly aligning with the test's intent of verifying chunk addition and removal for dynamic imports.