Skip to content

Conversation

clydin
Copy link
Member

@clydin clydin commented Oct 15, 2025

This commit improves the preservation of comments during the jasmine-to-vitest transformation.

Specifically, it fixes an issue where multi-line comments between chained spy calls were being discarded. The transformer has been updated to use a less destructive AST modification pattern, which successfully preserves this trivia.

Additionally, a previously failing test case for this scenario has been re-enabled and is now passing.

This commit refactors the test suite for the `jasmine-to-vitest` schematic by centralizing the duplicated `expectTransformation` helper function into a single `test-helpers.ts` file.

This change improves the long-term maintainability of the test suite by:
- Reducing code duplication across multiple spec files.
- Creating a single source of truth for the core test logic, making future updates easier.
- Improving the overall structure and readability of the tests.
@clydin clydin added the target: major This PR is targeted for the next major release label Oct 15, 2025
@clydin clydin force-pushed the refactor/jasmine-vitest-8 branch from 8289333 to a9f1817 Compare October 15, 2025 13:20
…vitest

This commit improves the preservation of comments during the `jasmine-to-vitest` transformation.

Specifically, it fixes an issue where multi-line comments between chained spy calls were being discarded. The transformer has been updated to use a less destructive AST modification pattern, which successfully preserves this trivia.

Additionally, a previously failing test case for this scenario has been re-enabled and is now passing.
@clydin clydin force-pushed the refactor/jasmine-vitest-8 branch from a9f1817 to 2027b1d Compare October 15, 2025 13:21
@clydin clydin added the action: review The PR is still awaiting reviews from at least one requested reviewer label Oct 15, 2025
…vior

The arrays of transformer functions have been reorganized into commented, logical stages.
This makes the implicit, top-down execution order explicit, which is critical for the correctness of context-sensitive transformations.
@jkrems jkrems added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Oct 15, 2025
@jkrems jkrems merged commit ff0c48a into angular:main Oct 15, 2025
56 of 57 checks passed
@clydin clydin deleted the refactor/jasmine-vitest-8 branch October 15, 2025 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action: merge The PR is ready for merge by the caretaker area: @schematics/angular target: major This PR is targeted for the next major release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants