~~~ fix some tests
This commit is contained in:
@ -41,7 +41,8 @@ export function main() {
|
|||||||
platformDynamicServer().bootstrapModule(ExampleModule).then(() => {
|
platformDynamicServer().bootstrapModule(ExampleModule).then(() => {
|
||||||
expect(getDOM().getText(body)).toEqual('Works!');
|
expect(getDOM().getText(body)).toEqual('Works!');
|
||||||
});
|
});
|
||||||
}));
|
}),
|
||||||
|
500);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,6 +11,7 @@ import 'rxjs/add/operator/map';
|
|||||||
import {CommonModule, Location} from '@angular/common';
|
import {CommonModule, Location} from '@angular/common';
|
||||||
import {Component, NgModule, NgModuleFactoryLoader} from '@angular/core';
|
import {Component, NgModule, NgModuleFactoryLoader} from '@angular/core';
|
||||||
import {ComponentFixture, TestBed, fakeAsync, inject, tick} from '@angular/core/testing';
|
import {ComponentFixture, TestBed, fakeAsync, inject, tick} from '@angular/core/testing';
|
||||||
|
import {getDOM} from '@angular/platform-browser/src/dom/dom_adapter';
|
||||||
import {expect} from '@angular/platform-browser/testing/matchers';
|
import {expect} from '@angular/platform-browser/testing/matchers';
|
||||||
import {Observable} from 'rxjs/Observable';
|
import {Observable} from 'rxjs/Observable';
|
||||||
import {of } from 'rxjs/observable/of';
|
import {of } from 'rxjs/observable/of';
|
||||||
@ -632,6 +633,7 @@ describe('Integration', () => {
|
|||||||
})));
|
})));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (getDOM().supportsDOMEvents()) { // Browser only
|
||||||
describe('router links', () => {
|
describe('router links', () => {
|
||||||
it('should support string router links', fakeAsync(inject([Router], (router: Router) => {
|
it('should support string router links', fakeAsync(inject([Router], (router: Router) => {
|
||||||
const fixture = createRoot(router, RootCmp);
|
const fixture = createRoot(router, RootCmp);
|
||||||
@ -828,6 +830,7 @@ describe('Integration', () => {
|
|||||||
expect(location.path()).toEqual('/team/22/simple?q=1#f');
|
expect(location.path()).toEqual('/team/22/simple?q=1#f');
|
||||||
})));
|
})));
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
describe('redirects', () => {
|
describe('redirects', () => {
|
||||||
it('should work', fakeAsync(inject([Router, Location], (router: Router, location: Location) => {
|
it('should work', fakeAsync(inject([Router, Location], (router: Router, location: Location) => {
|
||||||
@ -1350,6 +1353,7 @@ describe('Integration', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (getDOM().supportsDOMEvents()) { // Browser only
|
||||||
describe('routerActiveLink', () => {
|
describe('routerActiveLink', () => {
|
||||||
it('should set the class when the link is active (a tag)',
|
it('should set the class when the link is active (a tag)',
|
||||||
fakeAsync(inject([Router, Location], (router: Router, location: Location) => {
|
fakeAsync(inject([Router, Location], (router: Router, location: Location) => {
|
||||||
@ -1463,6 +1467,7 @@ describe('Integration', () => {
|
|||||||
})));
|
})));
|
||||||
|
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
describe('lazy loading', () => {
|
describe('lazy loading', () => {
|
||||||
it('works', fakeAsync(inject(
|
it('works', fakeAsync(inject(
|
||||||
|
Reference in New Issue
Block a user