Skip to content

fix(@schematics/angular): add missing imports for focus and skip APIs in refactor-jasmine-vitest#33034

Open
hawkgs wants to merge 1 commit intoangular:mainfrom
hawkgs:schematics/fix-refactor-jasmine-vitest-missing-imports
Open

fix(@schematics/angular): add missing imports for focus and skip APIs in refactor-jasmine-vitest#33034
hawkgs wants to merge 1 commit intoangular:mainfrom
hawkgs:schematics/fix-refactor-jasmine-vitest-missing-imports

Conversation

@hawkgs
Copy link
Copy Markdown
Member

@hawkgs hawkgs commented Apr 22, 2026

xdescribe, fdescribe, xit and fit Vitest equivalents use a slightly different API. This change handles the --add-imports aspect where the appropriate functions are imported for these specific APIs.

Fixes #33021

@hawkgs hawkgs requested a review from clydin April 22, 2026 14:15
@hawkgs hawkgs added type: bug/fix area: @schematics/angular action: review The PR is still awaiting reviews from at least one requested reviewer labels Apr 22, 2026
@hawkgs hawkgs force-pushed the schematics/fix-refactor-jasmine-vitest-missing-imports branch from a03671c to 6c04085 Compare April 22, 2026 14:16
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the Jasmine-to-Vitest transformer to correctly handle imports for focused and skipped tests by introducing a mapping for functions like fdescribe and xit. It also adds corresponding unit tests. The review feedback recommends using a Map instead of a plain object for the lookup table to avoid prototype-related issues and ensure consistency with the rest of the file.

Comment thread packages/schematics/angular/refactor/jasmine-vitest/test-file-transformer.ts Outdated
Comment thread packages/schematics/angular/refactor/jasmine-vitest/test-file-transformer.ts Outdated
… in refactor-jasmine-vitest

`xdescribe`, `fdescribe`, `xit` and `fit` Vitest equivalents use a slightly different API. This change handles the `--add-imports` aspect where the appropriate functions are imported for these specific APIs.

Fixes angular#33021
@hawkgs hawkgs force-pushed the schematics/fix-refactor-jasmine-vitest-missing-imports branch from 6c04085 to 7026e78 Compare April 22, 2026 14:26
@alan-agius4 alan-agius4 added target: patch This PR is targeted for the next patch release 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 Apr 23, 2026
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: patch This PR is targeted for the next patch release type: bug/fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor-jasmine-vitest does not include describe if xdescribe was used

3 participants