Skip to content

Commit 9589c69

Browse files
committed
test: add more failing cases
1 parent d11a8ec commit 9589c69

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

test/parse.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -886,8 +886,9 @@ test('parse/stringify empty key WIP', function (t) {
886886
t.test('edge case with object/arrays', function (st) {
887887

888888
st.deepEqual(qs.stringify({ '': { '': [2, 3] } }, { encode: false }), '[][0]=2&[][1]=3');
889-
890-
st.deepEqual(qs.parse('[][0]=2&[][1]=3', { allowEmptyKeys: true }), { '': { '': [2, 3] } });
889+
st.deepEqual(qs.stringify({ '': { '': [2, 3], a: 2 } }, { encode: false }), '[][0]=2&[][1]=3&[a]=2');
890+
st.deepEqual(qs.parse('[][0]=2&[][1]=3', { allowEmptyKeys: true }), { '': { '': ['2', '3'] } });
891+
st.deepEqual(qs.parse('[][0]=2&[][1]=3&[a]=2', { allowEmptyKeys: true }), { '': { '': ['2', '3'], a: '2' } });
891892

892893
st.end();
893894
});

0 commit comments

Comments
 (0)