refactor(router): update test based on router quick-cancelling ongoing navigations (#25740)

PR Close #25740
This commit is contained in:
Jason Aden
2018-09-11 22:18:50 -07:00
committed by Kara Erickson
parent c634176035
commit 12ccf57340
6 changed files with 205 additions and 284 deletions

View File

@ -1,19 +0,0 @@
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
export function assertDefined<T>(actual: T, msg: string) {
if (actual == null) {
throwError(msg);
}
}
function throwError(msg: string): never {
// tslint:disable-next-line
debugger; // Left intentionally for better debugger experience.
throw new Error(`ASSERTION ERROR: ${msg}`);
}