From c1473a2760238a7fc1506eab8a3c6f1fdcfdc2f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Ma=C5=82ecki?= Date: Tue, 23 Aug 2016 17:39:53 +0200 Subject: [PATCH] Test that `Request#isMatch` accepts any order of query strings --- test/request-test.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/request-test.js b/test/request-test.js index 2ef3255..7cf2e08 100644 --- a/test/request-test.js +++ b/test/request-test.js @@ -31,5 +31,17 @@ describe('Request unit tests', function () { headers: {} }).should.equal(false); }); + + it('should accept any order of query strings', function () { + var request = new Request(new Object(), { + method: 'GET', + url: '/?foo=bar&bar=foo' + }); + + request.isMatch({ + method: 'GET', + url: '/?bar=foo&foo=bar' + }).should.equal(true); + }); }); });