| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 42304de commit e7b7d72
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -231,8 +231,20 @@ assert.doesNotThrow(function() { | |||
| 231 | 231 | assert.equal(f, 'a:b;q:x%3Ay%3By%3Az'); | |
| 232 | 232 | } | |
| 233 | 233 | ||
| 234 | + // empty string | ||
| 235 | + assert.strictEqual(qs.stringify(), ''); | ||
| 236 | + assert.strictEqual(qs.stringify(0), ''); | ||
| 237 | + assert.strictEqual(qs.stringify([]), ''); | ||
| 238 | + assert.strictEqual(qs.stringify(null), ''); | ||
| 239 | + assert.strictEqual(qs.stringify(true), ''); | ||
| 240 | + | ||
| 234 | 241 | check(qs.parse(), {}); | |
| 235 | 242 | ||
| 243 | + // empty sep | ||
| 244 | + check(qs.parse('a', []), { a: '' }); | ||
| 245 | + | ||
| 246 | + // empty eq | ||
| 247 | + check(qs.parse('a', null, []), { '': 'a' }); | ||
| 236 | 248 | ||
| 237 | 249 | // Test limiting | |
| 238 | 250 | assert.equal( | |
| Back | FazBrowse Home | New Git URL |
0 commit comments