From c36498db8e39f7a88cccfc76f272fc974ba39b12 Mon Sep 17 00:00:00 2001 From: Blake Embrey Date: Sat, 1 Dec 2018 12:02:07 -0800 Subject: [PATCH] Add test case from #172 --- test.ts | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/test.ts b/test.ts index 5f6c775..6cee055 100644 --- a/test.ts +++ b/test.ts @@ -1747,7 +1747,7 @@ var TESTS: Test[] = [ ], [ '/route\\(\\\\(\\d+\\\\)\\)', - null, + null, [ '/route(\\', { @@ -1766,6 +1766,26 @@ var TESTS: Test[] = [ ], [] ], + [ + '/(login)?', + null, + [ + { + name: 0, + prefix: '/', + delimiter: '/', + optional: true, + repeat: false, + partial: false, + pattern: 'login' + } + ], + [ + ['/', ['/', undefined]], + ['/login', ['/login', 'login']] + ], + [] + ], /** * Regexps.