Skip to content

refactor(@schematics/angular): flatten transformSpyCallInspection logic#31681

Merged
alan-agius4 merged 1 commit intoangular:mainfrom
clydin:refactor/minor-cleanup-jasmine-vitest
Nov 4, 2025
Merged

refactor(@schematics/angular): flatten transformSpyCallInspection logic#31681
alan-agius4 merged 1 commit intoangular:mainfrom
clydin:refactor/minor-cleanup-jasmine-vitest

Conversation

@clydin
Copy link
Member

@clydin clydin commented Nov 3, 2025

Refactors the transformSpyCallInspection function in the Jasmine to Vitest schematic to improve readability and reduce nesting.

The previous implementation used a deeply nested if condition to handle various spy call inspection patterns. This change inverts the primary if condition into a guard clause, allowing the function to exit early if the node does not match the expected type. This flattens the overall structure of the function, making the main logic more prominent and easier to follow.

…ogic

Refactors the `transformSpyCallInspection` function in the Jasmine to Vitest schematic to improve readability and reduce nesting.

The previous implementation used a deeply nested `if` condition to handle various spy call inspection patterns. This change inverts the primary `if` condition into a guard clause, allowing the function to exit early if the node does not match the expected type. This flattens the overall structure of the function, making the main logic more prominent and easier to follow.
@clydin clydin added the target: rc This PR is targeted for the next release-candidate label Nov 3, 2025
@clydin clydin added the action: review The PR is still awaiting reviews from at least one requested reviewer label Nov 3, 2025
@alan-agius4 alan-agius4 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 Nov 4, 2025
@alan-agius4 alan-agius4 merged commit 7e724d7 into angular:main Nov 4, 2025
35 checks passed
@alan-agius4
Copy link
Collaborator

This PR was merged into the repository. The changes were merged into the following branches:

@clydin clydin deleted the refactor/minor-cleanup-jasmine-vitest branch November 4, 2025 12:30
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Dec 5, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants