@@ -63,10 +63,7 @@ describe('GoogleMap', () => {
63
63
const container = fixture . debugElement . query ( By . css ( 'div' ) ) ! ;
64
64
expect ( container . nativeElement . style . height ) . toBe ( DEFAULT_HEIGHT ) ;
65
65
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 ) ;
70
67
} ) ;
71
68
72
69
it ( 'sets height and width of the map' , ( ) => {
@@ -81,10 +78,7 @@ describe('GoogleMap', () => {
81
78
const container = fixture . debugElement . query ( By . css ( 'div' ) ) ! ;
82
79
expect ( container . nativeElement . style . height ) . toBe ( '750px' ) ;
83
80
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 ) ;
88
82
89
83
fixture . componentInstance . height = '650px' ;
90
84
fixture . componentInstance . width = '350px' ;
@@ -131,7 +125,7 @@ describe('GoogleMap', () => {
131
125
} ) ;
132
126
133
127
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 } ;
135
129
mapSpy = createMapSpy ( options ) ;
136
130
mapConstructorSpy = createMapConstructorSpy ( mapSpy ) . and . callThrough ( ) ;
137
131
@@ -152,7 +146,12 @@ describe('GoogleMap', () => {
152
146
} ) ;
153
147
154
148
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
+ } ;
156
155
mapSpy = createMapSpy ( options ) ;
157
156
mapConstructorSpy = createMapConstructorSpy ( mapSpy ) . and . callThrough ( ) ;
158
157
@@ -211,7 +210,7 @@ describe('GoogleMap', () => {
211
210
center : { lat : 12 , lng : 15 } ,
212
211
zoom : 5 ,
213
212
heading : 170 ,
214
- mapTypeId : undefined
213
+ mapTypeId : DEFAULT_OPTIONS . mapTypeId
215
214
} ;
216
215
mapSpy = createMapSpy ( correctedOptions ) ;
217
216
mapConstructorSpy = createMapConstructorSpy ( mapSpy ) ;
0 commit comments