@@ -63,10 +63,7 @@ describe('GoogleMap', () => {
6363 const container = fixture . debugElement . query ( By . css ( 'div' ) ) ! ;
6464 expect ( container . nativeElement . style . height ) . toBe ( DEFAULT_HEIGHT ) ;
6565 expect ( container . nativeElement . style . width ) . toBe ( DEFAULT_WIDTH ) ;
66- expect ( mapConstructorSpy ) . toHaveBeenCalledWith ( container . nativeElement , {
67- ...DEFAULT_OPTIONS ,
68- mapTypeId : undefined
69- } ) ;
66+ expect ( mapConstructorSpy ) . toHaveBeenCalledWith ( container . nativeElement , DEFAULT_OPTIONS ) ;
7067 } ) ;
7168
7269 it ( 'sets height and width of the map' , ( ) => {
@@ -81,10 +78,7 @@ describe('GoogleMap', () => {
8178 const container = fixture . debugElement . query ( By . css ( 'div' ) ) ! ;
8279 expect ( container . nativeElement . style . height ) . toBe ( '750px' ) ;
8380 expect ( container . nativeElement . style . width ) . toBe ( '400px' ) ;
84- expect ( mapConstructorSpy ) . toHaveBeenCalledWith ( container . nativeElement , {
85- ...DEFAULT_OPTIONS ,
86- mapTypeId : undefined
87- } ) ;
81+ expect ( mapConstructorSpy ) . toHaveBeenCalledWith ( container . nativeElement , DEFAULT_OPTIONS ) ;
8882
8983 fixture . componentInstance . height = '650px' ;
9084 fixture . componentInstance . width = '350px' ;
@@ -131,7 +125,7 @@ describe('GoogleMap', () => {
131125 } ) ;
132126
133127 it ( 'sets center and zoom of the map' , ( ) => {
134- const options = { center : { lat : 3 , lng : 5 } , zoom : 7 , mapTypeId : undefined } ;
128+ const options = { center : { lat : 3 , lng : 5 } , zoom : 7 , mapTypeId : DEFAULT_OPTIONS . mapTypeId } ;
135129 mapSpy = createMapSpy ( options ) ;
136130 mapConstructorSpy = createMapConstructorSpy ( mapSpy ) . and . callThrough ( ) ;
137131
@@ -152,7 +146,12 @@ describe('GoogleMap', () => {
152146 } ) ;
153147
154148 it ( 'sets map options' , ( ) => {
155- const options = { center : { lat : 3 , lng : 5 } , zoom : 7 , draggable : false , mapTypeId : undefined } ;
149+ const options = {
150+ center : { lat : 3 , lng : 5 } ,
151+ zoom : 7 ,
152+ draggable : false ,
153+ mapTypeId : DEFAULT_OPTIONS . mapTypeId
154+ } ;
156155 mapSpy = createMapSpy ( options ) ;
157156 mapConstructorSpy = createMapConstructorSpy ( mapSpy ) . and . callThrough ( ) ;
158157
@@ -211,7 +210,7 @@ describe('GoogleMap', () => {
211210 center : { lat : 12 , lng : 15 } ,
212211 zoom : 5 ,
213212 heading : 170 ,
214- mapTypeId : undefined
213+ mapTypeId : DEFAULT_OPTIONS . mapTypeId
215214 } ;
216215 mapSpy = createMapSpy ( correctedOptions ) ;
217216 mapConstructorSpy = createMapConstructorSpy ( mapSpy ) ;
0 commit comments