"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "packages/schematics/angular/migrations/update-12/update-angular-config_spec.ts" between
angular-cli-12.0.3.tar.gz and angular-cli-12.0.4.tar.gz

About: Angular CLI is a command line interface for Angular.

update-angular-config_spec.ts  (angular-cli-12.0.3):update-angular-config_spec.ts  (angular-cli-12.0.4)
skipping to change at line 123 skipping to change at line 123
expect(configurations?.two.optimization).toBeFalse(); expect(configurations?.two.optimization).toBeFalse();
}); });
it(`should not remove value in "options" when value is not the new default`, a sync () => { it(`should not remove value in "options" when value is not the new default`, a sync () => {
const newTree = await schematicRunner.runSchematicAsync(schematicName, {}, t ree).toPromise(); const newTree = await schematicRunner.runSchematicAsync(schematicName, {}, t ree).toPromise();
const { options } = getBuildTarget(newTree); const { options } = getBuildTarget(newTree);
expect(options.namedChunks).toBeTrue(); expect(options.namedChunks).toBeTrue();
expect(options.buildOptimizer).toBeFalse(); expect(options.buildOptimizer).toBeFalse();
}); });
it('migration should be idempotent', async () => {
const { options } = getBuildTarget(tree);
expect(options.aot).toBeTrue();
// First run
const newTree1 = await schematicRunner.runSchematicAsync(schematicName, {},
tree).toPromise();
const { options: options1 } = getBuildTarget(newTree1);
expect(options1.aot).toBeUndefined();
// Second run
const newTree2 = await schematicRunner
.runSchematicAsync(schematicName, {}, newTree1)
.toPromise();
const { options: options2 } = getBuildTarget(newTree2);
expect(options2.aot).toBeUndefined();
});
}); });
 End of changes. 1 change blocks. 
0 lines changed or deleted 18 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)