hunk.code_window:       });
         const { result } = await harness.executeOnce();
         expect(result?.success).toBe(true);
         harness.expectFile('dist/index.html').content.not.toContain(`<style`);
       });
       it(`should not extract critical css when 'optimization' is false`, async () => {
         harness.useTarget('build', {
  
hunk.labels: keep keep keep keep keep replace keep keep keep keep
hunk.after_edit:       harness
           .expectFile('dist/index.html')
           .content.toContain(
             `<link rel="stylesheet" href="styles.css" media="print" onload="this.media='all'">`,
           );
         harness.expectFile('dist/index.html').content.toContain(`body{color:#000;}`);
  
hunk.file_path: packages/angular_devkit/build_angular/src/builders/browser/tests/options/inline-critical_spec.ts
hunk.type: replace
file: /**
   * @license
   * Copyright Google LLC All Rights Reserved.
   *
   * Use of this source code is governed by an MIT-style license that can be
   * found in the LICENSE file at https://angular.io/license
   */
  
  import {
    FontsClass,
    OptimizationClass,
    OptimizationUnion,
    StylesClass,
  } from '../builders/browser/schema';
  
  export type NormalizedOptimizationOptions = Required<
    Omit<OptimizationClass, 'fonts' | 'styles'>
  > & {
    fonts: FontsClass;
    styles: StylesClass;
  };
  
  export function normalizeOptimization(
    optimization: OptimizationUnion = true,
  ): NormalizedOptimizationOptions {
    if (typeof optimization === 'object') {
      return {
        scripts: !!optimization.scripts,
        styles:
          typeof optimization.styles === 'object'
            ? optimization.styles
            : {
                minify: !!optimization.styles,
                // inlineCritical is always false unless explictly set.
                inlineCritical: false,
              },
        fonts:
          typeof optimization.fonts === 'object'
            ? optimization.fonts
            : {
                inline: !!optimization.fonts,
              },
      };
    }
  
    return {
      scripts: optimization,
      styles: {
        minify: optimization,
        // inlineCritical is always false unless explictly set.
        inlineCritical: false,
      },
      fonts: {
        inline: optimization,
      },
    };
  }
  