Skip to content

Commit 198de42

Browse files
committed
refactor: remove redundant tests for malformed query parameters in router coverage
1 parent b9c9ba7 commit 198de42

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

tests/router-coverage.test.js

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -303,28 +303,12 @@ describe('0http - Router Coverage', () => {
303303
expect(req.query).to.deep.equal({})
304304
})
305305

306-
it('should handle malformed query parameters', () => {
307-
const req = {}
308-
queryparams(req, '/path?invalid=%invalid')
309-
expect(req.path).to.equal('/path')
310-
// Should skip the invalid parameter due to decoding error
311-
expect(req.query).to.deep.equal({})
312-
})
313-
314306
it('should handle query parameters without values', () => {
315307
const req = {}
316308
queryparams(req, '/path?param=')
317309
expect(req.path).to.equal('/path')
318310
expect(req.query).to.deep.equal({ param: '' })
319311
})
320-
321-
it('should handle query parameters without equals sign', () => {
322-
const req = {}
323-
queryparams(req, '/path?param')
324-
expect(req.path).to.equal('/path')
325-
// This is skipped in the implementation as equalIndex === -1
326-
expect(req.query).to.deep.equal({})
327-
})
328312
})
329313

330314
describe('Next Middleware Executor', () => {

0 commit comments

Comments
 (0)