build(router): enable bazel tests for router (#21053)

Bazel runs on newer version of RxJs than is installed in Yarn. The never version subclasses `EmptyError` in a different way which fails the `instanceof` check. This change makes the `instanceof` check more robust with respect to `EmptyError`.

PR Close #21053
This commit is contained in:
Misko Hevery 2017-12-17 20:59:37 -08:00 committed by Igor Minar
parent 3d50fd7cac
commit 40dfe39e64
3 changed files with 2 additions and 5 deletions

View File

@ -166,7 +166,7 @@ class ApplyRedirects {
const concattedProcessedRoutes$ = concatAll.call(processedRoutes$);
const first$ = first.call(concattedProcessedRoutes$, (s: any) => !!s);
return _catch.call(first$, (e: any, _: any): Observable<UrlSegmentGroup> => {
if (e instanceof EmptyError) {
if (e instanceof EmptyError || e.name === 'EmptyError') {
if (this.noLeftoversInUrl(segmentGroup, segments, outlet)) {
return of (new UrlSegmentGroup([], {}));
}

View File

@ -23,8 +23,6 @@ ts_library(
jasmine_node_test(
name = "test",
bootstrap = ["angular_src/packages/_testing_init/init_node_spec.js"],
# dissable since tests are running but not yet passing
tags = ["manual"],
deps = [
":test_lib",
"//packages/_testing_init:node",
@ -36,8 +34,6 @@ ts_web_test(
bootstrap = [
"//:angular_bootstrap_scripts",
],
# dissable since tests are running but not yet passing
tags = ["manual"],
# do not sort
deps = [
"//packages/_testing_init:browser",

View File

@ -15,6 +15,7 @@ import {NavigationEnd, Resolve, Router, RouterModule} from '@angular/router';
describe('bootstrap', () => {
if (isNode) return;
let log: any[] = [];
let testProviders: any[] = null !;