// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`lib --angular-14 should generate a library with a standalone component as entry point with angular 14.1.0 1`] = `
"export * from './lib/my-lib/my-lib.component';
"
`;

exports[`lib --angular-14 should generate a library with a standalone component as entry point with angular 14.1.0 2`] = `
"import { Component } from '@angular/core';
import { CommonModule } from '@angular/common';

@Component({
  selector: 'proj-my-lib',
  standalone: true,
  imports: [CommonModule],
  templateUrl: './my-lib.component.html',
  styleUrls: ['./my-lib.component.css'],
})
export class MyLibComponent {}
"
`;

exports[`lib --angular-14 should generate a library with a standalone component as entry point with angular 14.1.0 3`] = `
"import { ComponentFixture, TestBed } from '@angular/core/testing';
import { MyLibComponent } from './my-lib.component';

describe('MyLibComponent', () => {
  let component: MyLibComponent;
  let fixture: ComponentFixture<MyLibComponent>;

  beforeEach(async () => {
    await TestBed.configureTestingModule({
      imports: [MyLibComponent],
    }).compileComponents();

    fixture = TestBed.createComponent(MyLibComponent);
    component = fixture.componentInstance;
    fixture.detectChanges();
  });

  it('should create', () => {
    expect(component).toBeTruthy();
  });
});
"
`;

exports[`lib --standalone should generate a library with a standalone component and have it flat 1`] = `
"export * from './lib/my-lib.component';
"
`;

exports[`lib --standalone should generate a library with a standalone component and have it flat 2`] = `
"import { Component } from '@angular/core';
import { CommonModule } from '@angular/common';

@Component({
  selector: 'proj-my-lib',
  standalone: true,
  imports: [CommonModule],
  templateUrl: './my-lib.component.html',
  styleUrls: ['./my-lib.component.css'],
})
export class MyLibComponent {}
"
`;

exports[`lib --standalone should generate a library with a standalone component and have it flat 3`] = `
"import { ComponentFixture, TestBed } from '@angular/core/testing';
import { MyLibComponent } from './my-lib.component';

describe('MyLibComponent', () => {
  let component: MyLibComponent;
  let fixture: ComponentFixture<MyLibComponent>;

  beforeEach(async () => {
    await TestBed.configureTestingModule({
      imports: [MyLibComponent],
    }).compileComponents();

    fixture = TestBed.createComponent(MyLibComponent);
    component = fixture.componentInstance;
    fixture.detectChanges();
  });

  it('should create', () => {
    expect(component).toBeTruthy();
  });
});
"
`;

exports[`lib --standalone should generate a library with a standalone component and have it flat with routing setup 1`] = `
"export * from './lib/lib.routes';

export * from './lib/my-lib.component';
"
`;

exports[`lib --standalone should generate a library with a standalone component and have it flat with routing setup 2`] = `
"import { Component } from '@angular/core';
import { CommonModule } from '@angular/common';

@Component({
  selector: 'proj-my-lib',
  standalone: true,
  imports: [CommonModule],
  templateUrl: './my-lib.component.html',
  styleUrls: ['./my-lib.component.css'],
})
export class MyLibComponent {}
"
`;

exports[`lib --standalone should generate a library with a standalone component and have it flat with routing setup 3`] = `
"import { ComponentFixture, TestBed } from '@angular/core/testing';
import { MyLibComponent } from './my-lib.component';

describe('MyLibComponent', () => {
  let component: MyLibComponent;
  let fixture: ComponentFixture<MyLibComponent>;

  beforeEach(async () => {
    await TestBed.configureTestingModule({
      imports: [MyLibComponent],
    }).compileComponents();

    fixture = TestBed.createComponent(MyLibComponent);
    component = fixture.componentInstance;
    fixture.detectChanges();
  });

  it('should create', () => {
    expect(component).toBeTruthy();
  });
});
"
`;

exports[`lib --standalone should generate a library with a standalone component and have it flat with routing setup 4`] = `
"import { Route } from '@angular/router';
import { MyLibComponent } from './my-lib.component';

export const myLibRoutes: Route[] = [{ path: '', component: MyLibComponent }];
"
`;

exports[`lib --standalone should generate a library with a standalone component as entry point 1`] = `
"export * from './lib/my-lib/my-lib.component';
"
`;

exports[`lib --standalone should generate a library with a standalone component as entry point 2`] = `
"import { Component } from '@angular/core';
import { CommonModule } from '@angular/common';

@Component({
  selector: 'proj-my-lib',
  standalone: true,
  imports: [CommonModule],
  templateUrl: './my-lib.component.html',
  styleUrls: ['./my-lib.component.css'],
})
export class MyLibComponent {}
"
`;

exports[`lib --standalone should generate a library with a standalone component as entry point 3`] = `
"import { ComponentFixture, TestBed } from '@angular/core/testing';
import { MyLibComponent } from './my-lib.component';

describe('MyLibComponent', () => {
  let component: MyLibComponent;
  let fixture: ComponentFixture<MyLibComponent>;

  beforeEach(async () => {
    await TestBed.configureTestingModule({
      imports: [MyLibComponent],
    }).compileComponents();

    fixture = TestBed.createComponent(MyLibComponent);
    component = fixture.componentInstance;
    fixture.detectChanges();
  });

  it('should create', () => {
    expect(component).toBeTruthy();
  });
});
"
`;

exports[`lib --standalone should generate a library with a standalone component as entry point and set up view encapsulation and change detection 1`] = `
"export * from './lib/my-lib/my-lib.component';
"
`;

exports[`lib --standalone should generate a library with a standalone component as entry point and set up view encapsulation and change detection 2`] = `
"import {
  ChangeDetectionStrategy,
  Component,
  ViewEncapsulation,
} from '@angular/core';
import { CommonModule } from '@angular/common';

@Component({
  selector: 'proj-my-lib',
  standalone: true,
  imports: [CommonModule],
  template: \`<p>my-lib works!</p>\`,
  styles: [],
  encapsulation: ViewEncapsulation.ShadowDom,
  changeDetection: ChangeDetectionStrategy.OnPush,
})
export class MyLibComponent {}
"
`;

exports[`lib --standalone should generate a library with a standalone component as entry point and skip tests 1`] = `
"export * from './lib/my-lib/my-lib.component';
"
`;

exports[`lib --standalone should generate a library with a standalone component as entry point and skip tests 2`] = `
"import { Component } from '@angular/core';
import { CommonModule } from '@angular/common';

@Component({
  selector: 'proj-my-lib',
  standalone: true,
  imports: [CommonModule],
  template: \`<p>my-lib works!</p>\`,
  styles: [],
})
export class MyLibComponent {}
"
`;

exports[`lib --standalone should generate a library with a standalone component as entry point following SFC pattern 1`] = `
"export * from './lib/my-lib/my-lib.component';
"
`;

exports[`lib --standalone should generate a library with a standalone component as entry point following SFC pattern 2`] = `
"import { Component } from '@angular/core';
import { CommonModule } from '@angular/common';

@Component({
  selector: 'proj-my-lib',
  standalone: true,
  imports: [CommonModule],
  template: \`<p>my-lib works!</p>\`,
  styles: [],
})
export class MyLibComponent {}
"
`;

exports[`lib --standalone should generate a library with a standalone component as entry point following SFC pattern 3`] = `
"import { ComponentFixture, TestBed } from '@angular/core/testing';
import { MyLibComponent } from './my-lib.component';

describe('MyLibComponent', () => {
  let component: MyLibComponent;
  let fixture: ComponentFixture<MyLibComponent>;

  beforeEach(async () => {
    await TestBed.configureTestingModule({
      imports: [MyLibComponent],
    }).compileComponents();

    fixture = TestBed.createComponent(MyLibComponent);
    component = fixture.componentInstance;
    fixture.detectChanges();
  });

  it('should create', () => {
    expect(component).toBeTruthy();
  });
});
"
`;

exports[`lib --standalone should generate a library with a standalone component as entry point with routing setup 1`] = `
"export * from './lib/lib.routes';

export * from './lib/my-lib/my-lib.component';
"
`;

exports[`lib --standalone should generate a library with a standalone component as entry point with routing setup 2`] = `
"import { Route } from '@angular/router';
import { MyLibComponent } from './my-lib/my-lib.component';

export const myLibRoutes: Route[] = [{ path: '', component: MyLibComponent }];
"
`;

exports[`lib --standalone should generate a library with a standalone component as entry point with routing setup 3`] = `
"import { Component } from '@angular/core';
import { CommonModule } from '@angular/common';

@Component({
  selector: 'proj-my-lib',
  standalone: true,
  imports: [CommonModule],
  templateUrl: './my-lib.component.html',
  styleUrls: ['./my-lib.component.css'],
})
export class MyLibComponent {}
"
`;

exports[`lib --standalone should generate a library with a standalone component as entry point with routing setup 4`] = `
"import { ComponentFixture, TestBed } from '@angular/core/testing';
import { MyLibComponent } from './my-lib.component';

describe('MyLibComponent', () => {
  let component: MyLibComponent;
  let fixture: ComponentFixture<MyLibComponent>;

  beforeEach(async () => {
    await TestBed.configureTestingModule({
      imports: [MyLibComponent],
    }).compileComponents();

    fixture = TestBed.createComponent(MyLibComponent);
    component = fixture.componentInstance;
    fixture.detectChanges();
  });

  it('should create', () => {
    expect(component).toBeTruthy();
  });
});
"
`;

exports[`lib --standalone should generate a library with a standalone component as entry point with routing setup and attach it to parent module as a lazy child 1`] = `
"export * from './lib/lib.routes';

export * from './lib/my-lib/my-lib.component';
"
`;

exports[`lib --standalone should generate a library with a standalone component as entry point with routing setup and attach it to parent module as a lazy child 2`] = `
"import { Route } from '@angular/router';
import { MyLibComponent } from './my-lib/my-lib.component';

export const myLibRoutes: Route[] = [{ path: '', component: MyLibComponent }];
"
`;

exports[`lib --standalone should generate a library with a standalone component as entry point with routing setup and attach it to parent module as a lazy child 3`] = `
"import { Route } from '@angular/router';

export const appRoutes: Route[] = [
  {
    path: 'my-lib',
    loadChildren: () => import('@proj/my-lib').then((m) => m.myLibRoutes),
  },
];
"
`;

exports[`lib --standalone should generate a library with a standalone component as entry point with routing setup and attach it to parent module as direct child 1`] = `
"export * from './lib/lib.routes';

export * from './lib/my-lib/my-lib.component';
"
`;

exports[`lib --standalone should generate a library with a standalone component as entry point with routing setup and attach it to parent module as direct child 2`] = `
"import { Route } from '@angular/router';
import { MyLibComponent } from './my-lib/my-lib.component';

export const myLibRoutes: Route[] = [{ path: '', component: MyLibComponent }];
"
`;

exports[`lib --standalone should generate a library with a standalone component as entry point with routing setup and attach it to parent module as direct child 3`] = `
"import { Route } from '@angular/router';
import { myLibRoutes } from '@proj/my-lib';

export const appRoutes: Route[] = [{ path: 'my-lib', children: myLibRoutes }];
"
`;

exports[`lib --standalone should generate a library with a standalone component as entry point with routing setup and attach it to standalone parent routes as a lazy child 1`] = `
"import { Route } from '@angular/router';
import { MyLibComponent } from './my-lib/my-lib.component';

export const myLibRoutes: Route[] = [
  {
    path: 'second',
    loadChildren: () => import('@proj/second').then((m) => m.secondRoutes),
  },
  { path: '', component: MyLibComponent },
];
"
`;

exports[`lib --standalone should generate a library with a standalone component as entry point with routing setup and attach it to standalone parent routes as direct child 1`] = `
"import { Route } from '@angular/router';
import { MyLibComponent } from './my-lib/my-lib.component';
import { secondRoutes } from '@proj/second';

export const myLibRoutes: Route[] = [
  { path: 'second', children: secondRoutes },
  { path: '', component: MyLibComponent },
];
"
`;

exports[`lib --standalone should generate a library with a standalone component in a directory 1`] = `
"export * from './lib/my-dir-my-lib/my-dir-my-lib.component';
"
`;

exports[`lib --standalone should generate a library with a standalone component in a directory 2`] = `
"import { Component } from '@angular/core';
import { CommonModule } from '@angular/common';

@Component({
  selector: 'proj-my-dir-my-lib',
  standalone: true,
  imports: [CommonModule],
  templateUrl: './my-dir-my-lib.component.html',
  styleUrls: ['./my-dir-my-lib.component.css'],
})
export class MyDirMyLibComponent {}
"
`;

exports[`lib --standalone should generate a library with a standalone component in a directory 3`] = `
"import { ComponentFixture, TestBed } from '@angular/core/testing';
import { MyDirMyLibComponent } from './my-dir-my-lib.component';

describe('MyDirMyLibComponent', () => {
  let component: MyDirMyLibComponent;
  let fixture: ComponentFixture<MyDirMyLibComponent>;

  beforeEach(async () => {
    await TestBed.configureTestingModule({
      imports: [MyDirMyLibComponent],
    }).compileComponents();

    fixture = TestBed.createComponent(MyDirMyLibComponent);
    component = fixture.componentInstance;
    fixture.detectChanges();
  });

  it('should create', () => {
    expect(component).toBeTruthy();
  });
});
"
`;

exports[`lib --standalone should generate a library with a standalone component in a directory with a simple name 1`] = `
"export * from './lib/my-lib/my-lib.component';
"
`;

exports[`lib --standalone should generate a library with a standalone component in a directory with a simple name 2`] = `
"import { Component } from '@angular/core';
import { CommonModule } from '@angular/common';

@Component({
  selector: 'proj-my-lib',
  standalone: true,
  imports: [CommonModule],
  templateUrl: './my-lib.component.html',
  styleUrls: ['./my-lib.component.css'],
})
export class MyLibComponent {}
"
`;

exports[`lib --standalone should generate a library with a standalone component in a directory with a simple name 3`] = `
"import { ComponentFixture, TestBed } from '@angular/core/testing';
import { MyLibComponent } from './my-lib.component';

describe('MyLibComponent', () => {
  let component: MyLibComponent;
  let fixture: ComponentFixture<MyLibComponent>;

  beforeEach(async () => {
    await TestBed.configureTestingModule({
      imports: [MyLibComponent],
    }).compileComponents();

    fixture = TestBed.createComponent(MyLibComponent);
    component = fixture.componentInstance;
    fixture.detectChanges();
  });

  it('should create', () => {
    expect(component).toBeTruthy();
  });
});
"
`;

exports[`lib router lazy should add RouterModule.forChild 1`] = `
"import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { RouterModule } from '@angular/router';
import { myDirMyLibRoutes } from './lib.routes';

@NgModule({
  imports: [CommonModule, RouterModule.forChild(myDirMyLibRoutes)],
})
export class MyDirMyLibModule {}
"
`;

exports[`lib router lazy should add RouterModule.forChild 2`] = `
"import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { RouterModule } from '@angular/router';
import { myLib2Routes } from './lib.routes';

@NgModule({
  imports: [CommonModule, RouterModule.forChild(myLib2Routes)],
})
export class MyLib2Module {}
"
`;

exports[`lib router lazy should update the parent module 1`] = `
"import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { RouterModule } from '@angular/router';
import { AppComponent } from './app.component';
@NgModule({
  imports: [
    BrowserModule,
    RouterModule.forRoot([
      {
        path: 'my-dir-my-lib',
        loadChildren: () =>
          import('@proj/my-dir/my-lib').then((m) => m.MyDirMyLibModule),
      },
    ]),
  ],
  declarations: [AppComponent],
  bootstrap: [AppComponent],
})
export class AppModule {}
"
`;

exports[`lib router lazy should update the parent module 3`] = `
"import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { RouterModule } from '@angular/router';
import { AppComponent } from './app.component';
@NgModule({
  imports: [
    BrowserModule,
    RouterModule.forRoot([
      {
        path: 'my-dir-my-lib',
        loadChildren: () =>
          import('@proj/my-dir/my-lib').then((m) => m.MyDirMyLibModule),
      },
      {
        path: 'my-lib2',
        loadChildren: () =>
          import('@proj/my-dir/my-lib2').then((m) => m.MyLib2Module),
      },
      {
        path: 'my-lib3',
        loadChildren: () =>
          import('@proj/my-dir/my-lib3').then((m) => m.MyLib3Module),
      },
    ]),
  ],
  declarations: [AppComponent],
  bootstrap: [AppComponent],
})
export class AppModule {}
"
`;

exports[`lib router lazy should update the parent module even if the route is declared outside the .forRoot(...) 1`] = `
"import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { RouterModule } from '@angular/router';
import { AppComponent } from './app.component';

const routes = [
  {
    path: 'my-dir-my-lib',
    loadChildren: () =>
      import('@proj/my-dir/my-lib').then((m) => m.MyDirMyLibModule),
  },
];

@NgModule({
  imports: [BrowserModule, RouterModule.forRoot(routes)],
  declarations: [AppComponent],
  bootstrap: [AppComponent],
})
export class AppModule {}
"
`;
