@@ -69,7 +69,6 @@ define([
6969 }
7070
7171 originalMethod = WishlistComponent . prototype [ methodName ] ;
72-
7372 if ( ! originalMethod ) {
7473 continue ;
7574 }
@@ -92,8 +91,8 @@ define([
9291 describe ( 'Initialization' , function ( ) {
9392 it ( 'should call _super() during initialization' , function ( ) {
9493 var instance = new mixin ( ) ;
95- spyOn ( instance , '_super' ) . and . callThrough ( ) ;
9694
95+ spyOn ( instance , '_super' ) . and . callThrough ( ) ;
9796 instance . initialize ( ) ;
9897
9998 expect ( instance . _super ) . toHaveBeenCalled ( ) ;
@@ -103,15 +102,13 @@ define([
103102 var instance = new mixin ( ) ;
104103
105104 instance . initialize ( ) ;
106-
107105 expect ( customerData . reload ) . toHaveBeenCalledWith ( [ 'wishlist' ] , true ) ;
108106 } ) ;
109107
110108 it ( 'should get wishlist data from customer data' , function ( ) {
111109 var instance = new mixin ( ) ;
112110
113111 instance . initialize ( ) ;
114-
115112 expect ( customerData . get ) . toHaveBeenCalledWith ( 'wishlist' ) ;
116113 } ) ;
117114
@@ -128,15 +125,13 @@ define([
128125 var instance = new mixin ( ) ;
129126
130127 instance . initialize ( ) ;
131-
132128 expect ( wishlistDataMock . subscribe ) . toHaveBeenCalledWith ( jasmine . any ( Function ) ) ;
133129 } ) ;
134130
135131 it ( 'should handle undefined counter gracefully' , function ( ) {
136132 var instance = new mixin ( ) ;
137133
138134 instance . initialize ( ) ;
139-
140135 // Call with undefined counter
141136 expect ( function ( ) {
142137 subscribeCallback ( { counter : undefined } ) ;
@@ -147,7 +142,6 @@ define([
147142 var instance = new mixin ( ) ;
148143
149144 instance . initialize ( ) ;
150-
151145 // Call with null counter
152146 expect ( function ( ) {
153147 subscribeCallback ( { counter : null } ) ;
@@ -158,7 +152,6 @@ define([
158152 var instance = new mixin ( ) ;
159153
160154 instance . initialize ( ) ;
161-
162155 // Call with no counter property
163156 expect ( function ( ) {
164157 subscribeCallback ( { } ) ;
@@ -171,7 +164,6 @@ define([
171164 var instance = new mixin ( ) ;
172165
173166 instance . initialize ( ) ;
174-
175167 // Call with counter update
176168 expect ( function ( ) {
177169 subscribeCallback ( { counter : 3 } ) ;
@@ -182,7 +174,6 @@ define([
182174 var instance = new mixin ( ) ;
183175
184176 instance . initialize ( ) ;
185-
186177 // Call with string counter
187178 expect ( function ( ) {
188179 subscribeCallback ( { counter : '7' } ) ;
@@ -193,7 +184,6 @@ define([
193184 var instance = new mixin ( ) ;
194185
195186 instance . initialize ( ) ;
196-
197187 // Call with zero counter
198188 expect ( function ( ) {
199189 subscribeCallback ( { counter : 0 } ) ;
@@ -204,7 +194,6 @@ define([
204194 var instance = new mixin ( ) ;
205195
206196 instance . initialize ( ) ;
207-
208197 // Multiple updates
209198 expect ( function ( ) {
210199 subscribeCallback ( { counter : 1 } ) ;
@@ -217,7 +206,6 @@ define([
217206 var instance = new mixin ( ) ;
218207
219208 instance . initialize ( ) ;
220-
221209 // Rapid updates
222210 expect ( function ( ) {
223211 for ( var i = 0 ; i < 10 ; i ++ ) {
@@ -254,30 +242,27 @@ define([
254242
255243 describe ( 'Error handling' , function ( ) {
256244 it ( 'should throw error when customerData.get returns null' , function ( ) {
257- customerDataMock . get . and . returnValue ( null ) ;
258-
259245 var instance = new mixin ( ) ;
260246
247+ customerDataMock . get . and . returnValue ( null ) ;
261248 expect ( function ( ) {
262249 instance . initialize ( ) ;
263250 } ) . toThrow ( ) ;
264251 } ) ;
265252
266253 it ( 'should throw error when customerData.get returns undefined' , function ( ) {
267- customerDataMock . get . and . returnValue ( undefined ) ;
268-
269254 var instance = new mixin ( ) ;
270255
256+ customerDataMock . get . and . returnValue ( undefined ) ;
271257 expect ( function ( ) {
272258 instance . initialize ( ) ;
273259 } ) . toThrow ( ) ;
274260 } ) ;
275261
276262 it ( 'should throw error when wishlist data has no subscribe method' , function ( ) {
277- customerDataMock . get . and . returnValue ( { } ) ;
278-
279263 var instance = new mixin ( ) ;
280264
265+ customerDataMock . get . and . returnValue ( { } ) ;
281266 expect ( function ( ) {
282267 instance . initialize ( ) ;
283268 } ) . toThrow ( ) ;
0 commit comments