@@ -220,7 +220,9 @@ test('should decode a malformed char that matches the decodeURIComponent regex',
220220 document . cookie = 'c=%E3' ;
221221 var cookies = Cookies . withConverter ( unescape ) ;
222222 strictEqual ( cookies . get ( 'c' ) , 'ã' , 'should convert the character correctly' ) ;
223- cookies . remove ( 'c' ) ;
223+ cookies . remove ( 'c' , {
224+ path : ''
225+ } ) ;
224226} ) ;
225227
226228test ( '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
230232 return unescape ( value ) ;
231233 }
232234 } ) ;
235+
233236 document . cookie = 'escaped=%u5317' ;
234237 strictEqual ( cookies . get ( 'escaped' ) , '北' , 'should use a custom method for escaped cookie' ) ;
235238
@@ -241,7 +244,11 @@ test('should be able to conditionally decode a single malformed cookie', functio
241244 encoded : '京'
242245 } , 'should retrieve everything' ) ;
243246
244- Object . keys ( cookies . get ( ) ) . forEach ( cookies . remove ) ;
247+ Object . keys ( cookies . get ( ) ) . forEach ( function ( name ) {
248+ cookies . remove ( name , {
249+ path : ''
250+ } ) ;
251+ } ) ;
245252 strictEqual ( document . cookie , '' , 'should remove everything' ) ;
246253} ) ;
247254
@@ -320,4 +327,3 @@ test('do not conflict with existent globals', function () {
320327 strictEqual ( window . Cookies , 'existent global' , 'should restore the original global' ) ;
321328 window . Cookies = Cookies ;
322329} ) ;
323-
0 commit comments