Skip to content

Commit 613562a

Browse files
committed
Adding test for cookie with [] in a name as to avoid regression.
1 parent b53cdf0 commit 613562a

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

‎test.js‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,12 @@ test('decode', 1, function () {
3535

3636
test('raw: true', 1, function () {
3737
document.cookie = 'c=%20v';
38-
equal($.cookie('c', { raw: true }), '%20v', 'should not decode');
38+
equal($.cookie('c', { raw: true }), '%20v', 'should not decode value');
39+
});
40+
41+
test('[] used in name', 1, function () {
42+
document.cookie = 'c[999]=foo';
43+
equal($.cookie('c[999]'), 'foo', 'should return value');
3944
});
4045

4146
test('embedded equals', 1, function() {

0 commit comments

Comments
 (0)