@@ -2,20 +2,14 @@ import { NgModule, Directive, Component, DebugElement, Injector, TemplateRef, Vi
22import { inject , ComponentFixture , fakeAsync , TestBed , flush , tick , flushMicrotasks } from '@angular/core/testing' ;
33import { Location } from '@angular/common' ;
44import { SpyLocation } from '@angular/common/testing' ;
5- import { By } from '@angular/platform-browser' ;
6- import { Subject } from 'rxjs' ;
75
86import { dispatchKeyboardEvent , dispatchFakeEvent } from '../testing/dispatch-events' ;
97
108import {
119 ESCAPE ,
1210 DOWN_ARROW ,
1311 MdcDialog ,
14- MdcDialogButton ,
1512 MdcDialogModule ,
16- MdcDialogComponent ,
17- MdcDialogPortal ,
18- MDC_DIALOG_DATA ,
1913 MdcDialogRef ,
2014 OverlayContainer
2115} from '@angular-mdc/web' ;
@@ -24,7 +18,6 @@ describe('MdcDialog Service', () => {
2418 let dialog : MdcDialog ;
2519 let overlayContainer : OverlayContainer ;
2620 let overlayContainerElement : HTMLElement ;
27- let scrolledSubject = new Subject ( ) ;
2821
2922 let testViewContainerRef : ViewContainerRef ;
3023 let viewContainerFixture : ComponentFixture < ComponentWithChildViewContainer > ;
@@ -59,7 +52,7 @@ describe('MdcDialog Service', () => {
5952 } ) ;
6053
6154 it ( 'should open a dialog with a component' , ( ) => {
62- let dialogRef = dialog . open ( SimpleDialog , {
55+ const dialogRef = dialog . open ( SimpleDialog , {
6356 viewContainerRef : testViewContainerRef
6457 } ) ;
6558
@@ -80,7 +73,7 @@ describe('MdcDialog Service', () => {
8073
8174 const data = { value : 'Knees' } ;
8275
83- let dialogRef = dialog . open ( templateRefFixture . componentInstance . templateRef , { data } ) ;
76+ const dialogRef = dialog . open ( templateRefFixture . componentInstance . templateRef , { data } ) ;
8477
8578 viewContainerFixture . detectChanges ( ) ;
8679
@@ -93,7 +86,7 @@ describe('MdcDialog Service', () => {
9386 } ) ;
9487
9588 it ( '#should open a simple dialog' , fakeAsync ( ( ) => {
96- let dialogRef = dialog . open ( SimpleDialog ) ;
89+ const dialogRef = dialog . open ( SimpleDialog ) ;
9790 expect ( dialogRef . componentInstance . dialogRef ) . toBe ( dialogRef ) ;
9891 viewContainerFixture . detectChanges ( ) ;
9992 flush ( ) ;
@@ -105,7 +98,7 @@ describe('MdcDialog Service', () => {
10598 } ) ) ;
10699
107100 it ( '#should close using escape key' , fakeAsync ( ( ) => {
108- let dialogRef = dialog . open ( SimpleDialog ) ;
101+ const dialogRef = dialog . open ( SimpleDialog ) ;
109102 viewContainerFixture . detectChanges ( ) ;
110103 flush ( ) ;
111104
@@ -115,7 +108,7 @@ describe('MdcDialog Service', () => {
115108 } ) ) ;
116109
117110 it ( '#should open a simple dialog with options' , fakeAsync ( ( ) => {
118- let dialogRef = dialog . open ( SimpleDialog , {
111+ const dialogRef = dialog . open ( SimpleDialog , {
119112 clickOutsideToClose : false ,
120113 escapeToClose : false ,
121114 buttonsStacked : false
0 commit comments