Skip to content

Commit 72f2a46

Browse files
clydinhybrist
authored andcommitted
refactor(@schematics/angular): rename jasmine-to-vitest schematic
Renames the `jasmine-to-vitest` schematic to `refactor-jasmine-vitest` for better clarity and consistency with the `refactor` directory structure. This new name more accurately reflects the schematic's action and aligns with a scalable naming convention for future refactoring schematics.
1 parent 5c3cb14 commit 72f2a46

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

packages/schematics/angular/collection.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@
144144
"private": true,
145145
"description": "[INTERNAL] Adds tailwind to a project. Intended for use for ng new/add."
146146
},
147-
"jasmine-to-vitest": {
147+
"refactor-jasmine-vitest": {
148148
"factory": "./refactor/jasmine-vitest",
149149
"schema": "./refactor/jasmine-vitest/schema.json",
150150
"description": "[EXPERIMENTAL] Refactors Jasmine tests to use Vitest APIs.",

packages/schematics/angular/refactor/jasmine-vitest/index_spec.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ describe('Jasmine to Vitest Schematic', () => {
5353
appTree.overwrite(specFilePath, content);
5454

5555
const tree = await schematicRunner.runSchematic(
56-
'jasmine-to-vitest',
56+
'refactor-jasmine-vitest',
5757
{ project: 'bar' },
5858
appTree,
5959
);
@@ -84,7 +84,7 @@ describe('Jasmine to Vitest Schematic', () => {
8484
appTree.create(testFilePath, testFileContent);
8585

8686
const tree = await schematicRunner.runSchematic(
87-
'jasmine-to-vitest',
87+
'refactor-jasmine-vitest',
8888
{ project: 'bar', fileSuffix: '.test.ts' },
8989
appTree,
9090
);
@@ -113,7 +113,7 @@ describe('Jasmine to Vitest Schematic', () => {
113113
schematicRunner.logger.subscribe((entry) => logs.push(entry.message));
114114

115115
await schematicRunner.runSchematic(
116-
'jasmine-to-vitest',
116+
'refactor-jasmine-vitest',
117117
{ project: 'bar', verbose: true },
118118
appTree,
119119
);
@@ -138,7 +138,7 @@ describe('Jasmine to Vitest Schematic', () => {
138138

139139
it('should only transform the specified file', async () => {
140140
const tree = await schematicRunner.runSchematic(
141-
'jasmine-to-vitest',
141+
'refactor-jasmine-vitest',
142142
{ project: 'bar', include: 'src/app/nested/nested.spec.ts' },
143143
appTree,
144144
);
@@ -152,7 +152,7 @@ describe('Jasmine to Vitest Schematic', () => {
152152

153153
it('should handle a Windows-style path', async () => {
154154
const tree = await schematicRunner.runSchematic(
155-
'jasmine-to-vitest',
155+
'refactor-jasmine-vitest',
156156
{ project: 'bar', include: 'src\\app\\nested\\nested.spec.ts' },
157157
appTree,
158158
);
@@ -171,7 +171,7 @@ describe('Jasmine to Vitest Schematic', () => {
171171
);
172172

173173
const tree = await schematicRunner.runSchematic(
174-
'jasmine-to-vitest',
174+
'refactor-jasmine-vitest',
175175
{ project: 'bar', include: 'src/app' },
176176
appTree,
177177
);
@@ -188,7 +188,7 @@ describe('Jasmine to Vitest Schematic', () => {
188188

189189
it('should process all files if `include` is not provided', async () => {
190190
const tree = await schematicRunner.runSchematic(
191-
'jasmine-to-vitest',
191+
'refactor-jasmine-vitest',
192192
{ project: 'bar' },
193193
appTree,
194194
);
@@ -203,7 +203,7 @@ describe('Jasmine to Vitest Schematic', () => {
203203
it('should throw if the include path does not exist', async () => {
204204
await expectAsync(
205205
schematicRunner.runSchematic(
206-
'jasmine-to-vitest',
206+
'refactor-jasmine-vitest',
207207
{ project: 'bar', include: 'src/non-existent' },
208208
appTree,
209209
),
@@ -226,7 +226,7 @@ describe('Jasmine to Vitest Schematic', () => {
226226
const logs: string[] = [];
227227
schematicRunner.logger.subscribe((entry) => logs.push(entry.message));
228228

229-
await schematicRunner.runSchematic('jasmine-to-vitest', {}, appTree);
229+
await schematicRunner.runSchematic('refactor-jasmine-vitest', {}, appTree);
230230

231231
expect(logs).toContain('Jasmine to Vitest Refactoring Summary:');
232232
expect(logs).toContain('- 1 test file(s) scanned.');

0 commit comments

Comments
 (0)