test(@angular/build): add additional unit tests for the i18n inliner - #33778
Open
clydin wants to merge 1 commit into
Open
test(@angular/build): add additional unit tests for the i18n inliner#33778clydin wants to merge 1 commit into
clydin wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Code Review
This pull request adds comprehensive unit tests to i18n-inliner_spec.ts to verify that I18nInliner correctly handles special characters, placeholders, multiple $localize calls within a single file, and parallel processing across multiple files. The review feedback suggests improving the robustness of these tests by asserting the exact file contents using .toBe() instead of partial matching with .toContain() to prevent syntax errors or escaping issues.
Add four unit tests to `i18n-inliner_spec.ts` to improve test coverage: - Verify special characters, quotes, backslashes, and newlines are safely escaped without syntax errors. - Verify $localize calls containing placeholder expressions are correctly reconstructed as template literals. - Verify multiple $localize calls within the same file are inlined without AST offset drift. - Verify parallel multi-threaded inlining across multiple files safely shares and deserializes translation Blobs across worker threads.
clydin
force-pushed
the
test/i18n-inliner-additional-tests
branch
from
August 5, 2026 19:23
1cabf81 to
212037e
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.
Add four unit tests to
i18n-inliner_spec.tsto improve test coverage: