@@ -24,7 +24,7 @@ function updateWorkspaceTargets(tree: UnitTestTree, workspaceTargets: WorkspaceT
24
24
25
25
const workspacePath = '/angular.json' ;
26
26
27
- describe ( 'Migration to version 9 ' , ( ) => {
27
+ describe ( 'Migration to version 12 ' , ( ) => {
28
28
describe ( 'Migrate workspace config' , ( ) => {
29
29
const schematicRunner = new SchematicTestRunner (
30
30
'migrations' ,
@@ -72,7 +72,7 @@ describe('Migration to version 9', () => {
72
72
updateWorkspaceTargets ( tree , config ) ;
73
73
74
74
const tree2 = await schematicRunner
75
- . runSchematicAsync ( 'workspace-version-9 ' , { } , tree . branch ( ) )
75
+ . runSchematicAsync ( 'remove-deprecated-i18n-options ' , { } , tree . branch ( ) )
76
76
. toPromise ( ) ;
77
77
const { dependencies } = JSON . parse ( tree2 . readContent ( '/package.json' ) ) ;
78
78
expect ( dependencies [ '@angular/localize' ] ) . toBe ( latestVersions . Angular ) ;
@@ -86,7 +86,7 @@ describe('Migration to version 9', () => {
86
86
updateWorkspaceTargets ( tree , config ) ;
87
87
88
88
const tree2 = await schematicRunner
89
- . runSchematicAsync ( 'workspace-version-9 ' , { } , tree . branch ( ) )
89
+ . runSchematicAsync ( 'remove-deprecated-i18n-options ' , { } , tree . branch ( ) )
90
90
. toPromise ( ) ;
91
91
config = getWorkspaceTargets ( tree2 ) . build ;
92
92
expect ( config . options . localize ) . toEqual ( [ 'fr' ] ) ;
@@ -101,7 +101,7 @@ describe('Migration to version 9', () => {
101
101
updateWorkspaceTargets ( tree , config ) ;
102
102
103
103
const tree2 = await schematicRunner
104
- . runSchematicAsync ( 'workspace-version-9 ' , { } , tree . branch ( ) )
104
+ . runSchematicAsync ( 'remove-deprecated-i18n-options ' , { } , tree . branch ( ) )
105
105
. toPromise ( ) ;
106
106
config = getWorkspaceTargets ( tree2 ) . build ;
107
107
expect ( config . options . i18nFormat ) . toBeUndefined ( ) ;
@@ -119,7 +119,7 @@ describe('Migration to version 9', () => {
119
119
updateWorkspaceTargets ( tree , config ) ;
120
120
121
121
const tree2 = await schematicRunner
122
- . runSchematicAsync ( 'workspace-version-9 ' , { } , tree . branch ( ) )
122
+ . runSchematicAsync ( 'remove-deprecated-i18n-options ' , { } , tree . branch ( ) )
123
123
. toPromise ( ) ;
124
124
config = getWorkspaceTargets ( tree2 ) . build ;
125
125
expect ( config . configurations . fr . baseHref ) . toBeUndefined ( ) ;
@@ -134,7 +134,7 @@ describe('Migration to version 9', () => {
134
134
updateWorkspaceTargets ( tree , config ) ;
135
135
136
136
const tree2 = await schematicRunner
137
- . runSchematicAsync ( 'workspace-version-9 ' , { } , tree . branch ( ) )
137
+ . runSchematicAsync ( 'remove-deprecated-i18n-options ' , { } , tree . branch ( ) )
138
138
. toPromise ( ) ;
139
139
config = getWorkspaceTargets ( tree2 ) . build ;
140
140
expect ( config . configurations . fr . outputPath ) . toBe ( 'dist' ) ;
@@ -149,7 +149,7 @@ describe('Migration to version 9', () => {
149
149
updateWorkspaceTargets ( tree , config ) ;
150
150
151
151
const tree2 = await schematicRunner
152
- . runSchematicAsync ( 'workspace-version-9 ' , { } , tree . branch ( ) )
152
+ . runSchematicAsync ( 'remove-deprecated-i18n-options ' , { } , tree . branch ( ) )
153
153
. toPromise ( ) ;
154
154
config = getWorkspaceTargets ( tree2 ) . build ;
155
155
expect ( config . configurations . fr . outputPath ) . toBe ( 'dist/abc' ) ;
@@ -170,7 +170,7 @@ describe('Migration to version 9', () => {
170
170
updateWorkspaceTargets ( tree , config ) ;
171
171
172
172
const tree2 = await schematicRunner
173
- . runSchematicAsync ( 'workspace-version-9 ' , { } , tree . branch ( ) )
173
+ . runSchematicAsync ( 'remove-deprecated-i18n-options ' , { } , tree . branch ( ) )
174
174
. toPromise ( ) ;
175
175
config = getWorkspaceTargets ( tree2 ) . build ;
176
176
expect ( config . configurations . staging . baseHref ) . toBe ( '/de/' ) ;
@@ -183,7 +183,7 @@ describe('Migration to version 9', () => {
183
183
updateWorkspaceTargets ( tree , config ) ;
184
184
185
185
const tree2 = await schematicRunner
186
- . runSchematicAsync ( 'workspace-version-9 ' , { } , tree . branch ( ) )
186
+ . runSchematicAsync ( 'remove-deprecated-i18n-options ' , { } , tree . branch ( ) )
187
187
. toPromise ( ) ;
188
188
config = getWorkspaceTargets ( tree2 ) . build ;
189
189
expect ( config . options . baseHref ) . toBe ( '/my-app/' ) ;
@@ -197,7 +197,7 @@ describe('Migration to version 9', () => {
197
197
updateWorkspaceTargets ( tree , config ) ;
198
198
199
199
const tree2 = await schematicRunner
200
- . runSchematicAsync ( 'workspace-version-9 ' , { } , tree . branch ( ) )
200
+ . runSchematicAsync ( 'remove-deprecated-i18n-options ' , { } , tree . branch ( ) )
201
201
. toPromise ( ) ;
202
202
config = getWorkspaceTargets ( tree2 ) [ 'extract-i18n' ] ;
203
203
expect ( config . options . i18nFormat ) . toBeUndefined ( ) ;
@@ -214,7 +214,7 @@ describe('Migration to version 9', () => {
214
214
updateWorkspaceTargets ( tree , config ) ;
215
215
216
216
const tree2 = await schematicRunner
217
- . runSchematicAsync ( 'workspace-version-9 ' , { } , tree . branch ( ) )
217
+ . runSchematicAsync ( 'remove-deprecated-i18n-options ' , { } , tree . branch ( ) )
218
218
. toPromise ( ) ;
219
219
const projectConfig = JSON . parse ( tree2 . readContent ( workspacePath ) ) . projects [
220
220
'migration-test'
@@ -230,7 +230,7 @@ describe('Migration to version 9', () => {
230
230
updateWorkspaceTargets ( tree , config ) ;
231
231
232
232
const tree2 = await schematicRunner
233
- . runSchematicAsync ( 'workspace-version-9 ' , { } , tree . branch ( ) )
233
+ . runSchematicAsync ( 'remove-deprecated-i18n-options ' , { } , tree . branch ( ) )
234
234
. toPromise ( ) ;
235
235
const projectConfig = JSON . parse ( tree2 . readContent ( workspacePath ) ) . projects [
236
236
'migration-test'
@@ -249,7 +249,7 @@ describe('Migration to version 9', () => {
249
249
updateWorkspaceTargets ( tree , config ) ;
250
250
251
251
const tree2 = await schematicRunner
252
- . runSchematicAsync ( 'workspace-version-9 ' , { } , tree . branch ( ) )
252
+ . runSchematicAsync ( 'remove-deprecated-i18n-options ' , { } , tree . branch ( ) )
253
253
. toPromise ( ) ;
254
254
const projectConfig = JSON . parse ( tree2 . readContent ( workspacePath ) ) . projects [
255
255
'migration-test'
@@ -269,7 +269,7 @@ describe('Migration to version 9', () => {
269
269
updateWorkspaceTargets ( tree , config ) ;
270
270
271
271
const tree2 = await schematicRunner
272
- . runSchematicAsync ( 'workspace-version-9 ' , { } , tree . branch ( ) )
272
+ . runSchematicAsync ( 'remove-deprecated-i18n-options ' , { } , tree . branch ( ) )
273
273
. toPromise ( ) ;
274
274
const projectConfig = JSON . parse ( tree2 . readContent ( workspacePath ) ) . projects [
275
275
'migration-test'
@@ -285,7 +285,7 @@ describe('Migration to version 9', () => {
285
285
describe ( 'when i18n builder options are not set' , ( ) => {
286
286
it ( `should not add 'localize' option` , async ( ) => {
287
287
const tree2 = await schematicRunner
288
- . runSchematicAsync ( 'workspace-version-9 ' , { } , tree . branch ( ) )
288
+ . runSchematicAsync ( 'remove-deprecated-i18n-options ' , { } , tree . branch ( ) )
289
289
. toPromise ( ) ;
290
290
const config = getWorkspaceTargets ( tree2 ) . build ;
291
291
expect ( config . options . localize ) . toBeUndefined ( ) ;
@@ -294,7 +294,7 @@ describe('Migration to version 9', () => {
294
294
295
295
it ( 'should not add i18n project config' , async ( ) => {
296
296
const tree2 = await schematicRunner
297
- . runSchematicAsync ( 'workspace-version-9 ' , { } , tree . branch ( ) )
297
+ . runSchematicAsync ( 'remove-deprecated-i18n-options ' , { } , tree . branch ( ) )
298
298
. toPromise ( ) ;
299
299
const projectConfig = JSON . parse ( tree2 . readContent ( workspacePath ) ) . projects [
300
300
'migration-test'
0 commit comments