Commit 58474ec
committed
feat(@schematics/angular): introduce initial jasmine-to-vitest unit test refactor schematic
This commit introduces the base infrastructure for an experimental jasmine-to-vitest refactoring schematic and the initial set of transformers for lifecycle functions.
The base infrastructure includes the main schematic entry point, the AST transformer driver, and various utilities for AST manipulation, validation, and reporting.
The lifecycle transformers handle:
- fdescribe/fit -> describe.only/it.only
- xdescribe/xit -> describe.skip/it.skip
- pending() -> it.skip()
- Asynchronous tests using the 'done' callback are converted to 'async/await'.
Usage:
ng generate jasmine-to-vitest [--project <project-name>]1 parent 5389951 commit 58474ecCopy full SHA for 58474ec
File tree
Expand file treeCollapse file tree
13 files changed
+1175
-1
lines changedOpen diff view settings
Filter options
- packages/schematics/angular
- refactor/jasmine-vitest
- transformers
- utils
Expand file treeCollapse file tree
13 files changed
+1175
-1
lines changedOpen diff view settings
Collapse file
packages/schematics/angular/BUILD.bazel
Copy file name to clipboardExpand all lines: packages/schematics/angular/BUILD.bazel+6-1Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
20 | 20 | |
21 | 21 | |
22 | 22 | |
23 | | - |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | + |
24 | 27 | |
25 | 28 | |
26 | 29 | |
| ||
55 | 58 | |
56 | 59 | |
57 | 60 | |
| 61 | + |
58 | 62 | |
59 | 63 | |
60 | 64 | |
| ||
123 | 127 | |
124 | 128 | |
125 | 129 | |
| 130 | + |
126 | 131 | |
127 | 132 | |
128 | 133 | |
|
Collapse file
packages/schematics/angular/collection.json
Copy file name to clipboardExpand all lines: packages/schematics/angular/collection.json+6Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
143 | 143 | |
144 | 144 | |
145 | 145 | |
| 146 | + |
| 147 | + |
| 148 | + |
| 149 | + |
| 150 | + |
| 151 | + |
146 | 152 | |
147 | 153 | |
148 | 154 | |
Collapse file
packages/schematics/angular/refactor/jasmine-vitest/index.ts
Copy file name to clipboard+101Lines changed: 101 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | + |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | + |
| 34 | + |
| 35 | + |
| 36 | + |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | + |
| 42 | + |
| 43 | + |
| 44 | + |
| 45 | + |
| 46 | + |
| 47 | + |
| 48 | + |
| 49 | + |
| 50 | + |
| 51 | + |
| 52 | + |
| 53 | + |
| 54 | + |
| 55 | + |
| 56 | + |
| 57 | + |
| 58 | + |
| 59 | + |
| 60 | + |
| 61 | + |
| 62 | + |
| 63 | + |
| 64 | + |
| 65 | + |
| 66 | + |
| 67 | + |
| 68 | + |
| 69 | + |
| 70 | + |
| 71 | + |
| 72 | + |
| 73 | + |
| 74 | + |
| 75 | + |
| 76 | + |
| 77 | + |
| 78 | + |
| 79 | + |
| 80 | + |
| 81 | + |
| 82 | + |
| 83 | + |
| 84 | + |
| 85 | + |
| 86 | + |
| 87 | + |
| 88 | + |
| 89 | + |
| 90 | + |
| 91 | + |
| 92 | + |
| 93 | + |
| 94 | + |
| 95 | + |
| 96 | + |
| 97 | + |
| 98 | + |
| 99 | + |
| 100 | + |
| 101 | + |
Collapse file
packages/schematics/angular/refactor/jasmine-vitest/schema.json
Copy file name to clipboard+26Lines changed: 26 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | + |
Collapse file
packages/schematics/angular/refactor/jasmine-vitest/test-file-transformer.ts
Copy file name to clipboard+80Lines changed: 80 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | + |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | + |
| 34 | + |
| 35 | + |
| 36 | + |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | + |
| 42 | + |
| 43 | + |
| 44 | + |
| 45 | + |
| 46 | + |
| 47 | + |
| 48 | + |
| 49 | + |
| 50 | + |
| 51 | + |
| 52 | + |
| 53 | + |
| 54 | + |
| 55 | + |
| 56 | + |
| 57 | + |
| 58 | + |
| 59 | + |
| 60 | + |
| 61 | + |
| 62 | + |
| 63 | + |
| 64 | + |
| 65 | + |
| 66 | + |
| 67 | + |
| 68 | + |
| 69 | + |
| 70 | + |
| 71 | + |
| 72 | + |
| 73 | + |
| 74 | + |
| 75 | + |
| 76 | + |
| 77 | + |
| 78 | + |
| 79 | + |
| 80 | + |
0 commit comments