close
The Wayback Machine - https://web.archive.org/web/20201023163748/https://github.com/angular/angular-cli/pull/18316/files
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(@schematics/angular): remove compileComponents from component test schematic #18316

Open
wants to merge 1 commit into
base: master
from
Open
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

@@ -2,13 +2,9 @@ import { TestBed } from '@angular/core/testing';
import { AppComponent } from './app.component';

describe('AppComponent', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [
AppComponent
],
}).compileComponents();
});
beforeEach(() => TestBed.configureTestingModule({
declarations: [AppComponent]
}));

it('should create the app', () => {
const fixture = TestBed.createComponent(AppComponent);
@@ -68,15 +68,10 @@ describe('Karma Builder', () => {
import { AppComponent } from './app.component';
describe('AppComponent', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [
],
declarations: [
AppComponent
]
}).compileComponents();
});
beforeEach(() => TestBed.configureTestingModule({
imports: [],
declarations: [AppComponent]
}));
it('should not contain text that is hidden via css', () => {
const fixture = TestBed.createComponent(AppComponent);
@@ -148,16 +143,10 @@ describe('Karma Builder', () => {
import { AppComponent } from './app.component';
describe('AppComponent', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [
HttpClientModule
],
declarations: [
AppComponent
]
}).compileComponents();
});
beforeEach(() => TestBed.configureTestingModule({
imports: [HttpClientModule],
declarations: [AppComponent]
}));
it('should create the app', () => {
const fixture = TestBed.createComponent(AppComponent);
@@ -8,11 +8,9 @@
import { TestBed } from '@angular/core/testing';
import { AppComponent } from './app.component';
describe('AppComponent', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [AppComponent],
}).compileComponents();
});
beforeEach(() => TestBed.configureTestingModule({
declarations: [AppComponent],
}));
it('should create the app', () => {
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.debugElement.componentInstance;
@@ -13,12 +13,9 @@ describe('LibComponent', () => {
let component: LibComponent;
let fixture: ComponentFixture<LibComponent>;

beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ LibComponent ]
})
.compileComponents();
});
beforeEach(() => TestBed.configureTestingModule({
declarations: [LibComponent]
}));

beforeEach(() => {
fixture = TestBed.createComponent(LibComponent);
@@ -8,13 +8,9 @@
import { TestBed } from '@angular/core/testing';
import { AppComponent } from './app.component';
describe('AppComponent', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [
AppComponent
],
}).compileComponents();
});
beforeEach(() => TestBed.configureTestingModule({
declarations: [AppComponent]
}));
it('should create the app', () => {
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.debugElement.componentInstance;
@@ -3,16 +3,10 @@ import { RouterTestingModule } from '@angular/router/testing';<% } %>
import { AppComponent } from './app.component';

describe('AppComponent', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({<% if (routing) { %>
imports: [
RouterTestingModule
],<% } %>
declarations: [
AppComponent
],
}).compileComponents();
});
beforeEach(() => TestBed.configureTestingModule({<% if (routing) { %>
imports: [RouterTestingModule],<% } %>
declarations: [AppComponent]
}));

it('should create the app', () => {
const fixture = TestBed.createComponent(AppComponent);
@@ -6,12 +6,9 @@ describe('<%= classify(name) %><%= classify(type) %>', () => {
let component: <%= classify(name) %><%= classify(type) %>;
let fixture: ComponentFixture<<%= classify(name) %><%= classify(type) %>>;

beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ <%= classify(name) %><%= classify(type) %> ]
})
.compileComponents();
});
beforeEach(() => TestBed.configureTestingModule({
declarations: [<%= classify(name) %><%= classify(type) %>]
}));

beforeEach(() => {
fixture = TestBed.createComponent(<%= classify(name) %><%= classify(type) %>);
@@ -3,13 +3,9 @@ import { TestBed } from '@angular/core/testing';
import { AppComponent } from './app.component';

describe('AppComponent', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [
AppComponent
],
}).compileComponents();
});
beforeEach(() => TestBed.configureTestingModule({
declarations: [AppComponent]
}));

it('should create the app', () => {
const fixture = TestBed.createComponent(AppComponent);
@@ -1,13 +1,9 @@
import { TestBed } from '@angular/core/testing';
import { AppComponent } from './app.component';
describe('AppComponent', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [
AppComponent
],
}).compileComponents();
});
beforeEach(() => TestBed.configureTestingModule({
declarations: [AppComponent]
}));
it('should create the app', () => {
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.debugElement.componentInstance;
@@ -3,16 +3,10 @@ import { RouterModule } from '@angular/router';
import { AppComponent } from './app.component';

describe('AppComponent', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [
AppComponent
],
imports: [
RouterModule.forRoot([])
],
}).compileComponents();
});
beforeEach(() => TestBed.configureTestingModule({
declarations: [AppComponent],
imports: [RouterModule.forRoot([])]
}));

it('should create the app', () => {
const fixture = TestBed.createComponent(AppComponent);
@@ -6,12 +6,9 @@ describe('LazyCompComponent', () => {
let component: LazyCompComponent;
let fixture: ComponentFixture<LazyCompComponent>;

beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ LazyCompComponent ]
})
.compileComponents();
});
beforeEach(() => TestBed.configureTestingModule({
declarations: [LazyCompComponent]
}));

beforeEach(() => {
fixture = TestBed.createComponent(LazyCompComponent);
@@ -32,11 +32,9 @@ export default function () {
import { AppComponent } from './app.component';
describe('AppComponent', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ AppComponent ]
}).compileComponents();
});
beforeEach(() => TestBed.configureTestingModule({
declarations: [AppComponent]
}));
it('should have access to string-script.js', () => {
let app = TestBed.createComponent(AppComponent).debugElement.componentInstance;
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.