Skip to content

Commit

Permalink
[Tests] add test cases for stringify with empty keys
Browse files Browse the repository at this point in the history
  • Loading branch information
Coobaha authored and ljharb committed May 21, 2022
1 parent 95c6c3e commit c077991
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 27 deletions.
54 changes: 27 additions & 27 deletions test/empty-keys-cases.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions test/stringify.js
Original file line number Diff line number Diff line change
Expand Up @@ -958,6 +958,7 @@ test('stringifies empty keys', function (t) {
emptyTestCases.forEach(function (testCase) {
t.test('stringifies an object with empty string key with ' + testCase.input, function (st) {
st.deepEqual(qs.stringify(testCase.withEmptyKeys, { encode: false }), testCase.stringifyOutput);
st.deepEqual(qs.stringify(testCase.noEmptyKeys, { encode: false }), testCase.stringifyOutputNoEmpty);

st.end();
});
Expand Down

0 comments on commit c077991

Please sign in to comment.