Skip to content

Commit

Permalink
feat(@angular/cli): add async method in Jasmine Tests blueprints (#4775)
Browse files Browse the repository at this point in the history
  • Loading branch information
wKoza authored and hansl committed Feb 21, 2017
1 parent d1e13ac commit c792c9f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,16 @@ import { RouterTestingModule } from '@angular/router/testing';<% } %>
import { AppComponent } from './app.component';

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

it('should create the app', async(() => {
const fixture = TestBed.createComponent(AppComponent);
Expand Down
9 changes: 4 additions & 5 deletions tests/e2e/tests/build/assets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,17 +77,16 @@ export default function () {
import { AppComponent } from './app.component';
describe('AppComponent', () => {
beforeEach(() => {
beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [
HttpModule
],
declarations: [
AppComponent
],
});
TestBed.compileComponents();
});
]
}).compileComponents();
}));
it('should create the app', async(() => {
const fixture = TestBed.createComponent(AppComponent);
Expand Down
9 changes: 5 additions & 4 deletions tests/e2e/tests/test/test-scripts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,11 @@ export default function () {
import { AppComponent } from './app.component';
describe('AppComponent', () => {
beforeEach(() => {
TestBed.configureTestingModule({ declarations: [ AppComponent ] });
TestBed.compileComponents();
});
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ AppComponent ]
}).compileComponents();
}));
it('should have access to string-script.js', async(() => {
let app = TestBed.createComponent(AppComponent).debugElement.componentInstance;
Expand Down

0 comments on commit c792c9f

Please sign in to comment.