Conversation
- Each test uses the template and expected error of the matching `hydrate` case in Angular's `r3_template_transform_spec.ts`, which the conformance fixture extracts without assertions.
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.
Adds 8 tests to
crates/oxc_angular_compiler/tests/r3_template_transform_test.rs, one for eachhydratevalidation case in Angular'spackages/compiler/test/render3/r3_template_transform_spec.ts(lines 1698-1757 on angular/angular main) that had no coverage here. The conformance fixture lists these cases with empty assertions because they usetoThrowError(...)/not.toThrow(), which the extractor does not handle (crates/angular_conformance/src/extractor/assertion_handlers.rs).Each test uses the upstream template and expected message:
Hydration trigger "interaction" cannot have parametershydrate on viewportneverwithouthydrate(also withprefetch):Unrecognized triggerhydrate neverfollowed by extra characters:Unrecognized triggerhydrate neverwith additional blocks, with spaces, and after another block: noUnrecognized triggerhydrate neverbefore or after anotherhydratetrigger:Cannot specify additional `hydrate` triggers if `hydrate never` is presentEvidence:
cargo test -p oxc_angular_compiler: 2856 passed, 0 failed.cargo fmt --checkis clean.transform/control_flow.rslocally. Makingis_hydrate_never_patternalways returnfalsefails the three "no error withhydrate never" tests and the combined-trigger test. Renaming the three error messages fails the four tests that expect an error. Together the two mutations fail 7 of the 8 tests;should_not_report_missing_reference_on_hydrate_triggeris not exercised by either.