X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;f=test%2Flib%2Frouter.js;fp=test%2Flib%2Frouter.js;h=f9a2401eba045bb3b0972acac39287a07a907a01;hb=1296167385b38ca226f17c3a87ac2135d53c769b;hp=d63917087d1490021d5441564669008c60f1676c;hpb=c19f9a34ec7ae311e025118e51705842e31e7066;p=squeep-api-dingus diff --git a/test/lib/router.js b/test/lib/router.js index d639170..f9a2401 100644 --- a/test/lib/router.js +++ b/test/lib/router.js @@ -46,6 +46,13 @@ describe('Router', function () { const r = router._pathToRoutePath(p); assert.deepStrictEqual(r, expected); }); + it('defines a path with escaped parameter', function () { + const p = '/a/\\:b/c'; + const expected = ['', 'a', ':b', 'c']; + expected[Router.kPathMethods] = {}; + const r = router._pathToRoutePath(p); + assert.deepStrictEqual(r, expected); + }); }); // _pathToRoutePath describe('_pathCompareExact', function () {