@@ -220,7 +220,9 @@ test('should decode a malformed char that matches the decodeURIComponent regex',
220
220
document . cookie = 'c=%E3' ;
221
221
var cookies = Cookies . withConverter ( unescape ) ;
222
222
strictEqual ( cookies . get ( 'c' ) , 'ã' , 'should convert the character correctly' ) ;
223
- cookies . remove ( 'c' ) ;
223
+ cookies . remove ( 'c' , {
224
+ path : ''
225
+ } ) ;
224
226
} ) ;
225
227
226
228
test ( 'should be able to conditionally decode a single malformed cookie' , function ( ) {
@@ -230,6 +232,7 @@ test('should be able to conditionally decode a single malformed cookie', functio
230
232
return unescape ( value ) ;
231
233
}
232
234
} ) ;
235
+
233
236
document . cookie = 'escaped=%u5317' ;
234
237
strictEqual ( cookies . get ( 'escaped' ) , '北' , 'should use a custom method for escaped cookie' ) ;
235
238
@@ -241,7 +244,11 @@ test('should be able to conditionally decode a single malformed cookie', functio
241
244
encoded : '京'
242
245
} , 'should retrieve everything' ) ;
243
246
244
- Object . keys ( cookies . get ( ) ) . forEach ( cookies . remove ) ;
247
+ Object . keys ( cookies . get ( ) ) . forEach ( function ( name ) {
248
+ cookies . remove ( name , {
249
+ path : ''
250
+ } ) ;
251
+ } ) ;
245
252
strictEqual ( document . cookie , '' , 'should remove everything' ) ;
246
253
} ) ;
247
254
@@ -320,4 +327,3 @@ test('do not conflict with existent globals', function () {
320
327
strictEqual ( window . Cookies , 'existent global' , 'should restore the original global' ) ;
321
328
window . Cookies = Cookies ;
322
329
} ) ;
323
-
0 commit comments