Closed adnan-creator closed 2 years ago
Thanks! for now these tests seem fine.
Merging #424 (5dbeeb4) into master (e2fd364) will increase coverage by
0.00%
. The diff coverage is100.00%
.
@@ Coverage Diff @@
## master #424 +/- ##
=======================================
Coverage 99.78% 99.78%
=======================================
Files 8 8
Lines 1388 1393 +5
Branches 167 169 +2
=======================================
+ Hits 1385 1390 +5
Misses 3 3
Impacted Files | Coverage Δ | |
---|---|---|
lib/stringify.js | 99.29% <100.00%> (+0.03%) |
:arrow_up: |
test/stringify.js | 99.75% <100.00%> (-0.01%) |
:arrow_down: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update e2fd364...5dbeeb4. Read the comment docs.
Following changes were made:
encodeValuesOnly = true
, then all characters except the values must not be encoded. This includes brackets and joining characters such as comma. It works perfectly for all other characters except when comma is used to join elements of an array. Then even the comma is encoded.qs.stringify({ a: ['b', 'c', 'd'] }, { arrayFormat: 'comma' })
to be equal to'a=b,c,d'
. Which is not the expected behavior as for the comma to not be encoded we must either setencode: false
orencodeValuesOnly: true
. So the right result would be'a=b%2Cc%2Cd'
as the default functionality of the function is to encode the complete string.