Skip to content

Commit dcb522f

Browse files
committed
Add test case for negative lookahead
1 parent 66e0c25 commit dcb522f

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

src/index.spec.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2584,6 +2584,28 @@ const TESTS: Test[] = [
25842584
[{ test: "123.123" }, "/123.123"],
25852585
[{ test: "123.abc" }, null]
25862586
]
2587+
],
2588+
[
2589+
"/:test((?!login)[^/]+)",
2590+
undefined,
2591+
[
2592+
{
2593+
name: "test",
2594+
prefix: "/",
2595+
delimiter: "/",
2596+
optional: false,
2597+
repeat: false,
2598+
pattern: "(?!login)[^/]+"
2599+
}
2600+
],
2601+
[
2602+
["/route", ["/route", "route"]],
2603+
["/login", null]
2604+
],
2605+
[
2606+
[{ test: "route" }, "/route"],
2607+
[{ test: "login" }, null]
2608+
]
25872609
]
25882610
];
25892611

0 commit comments

Comments
 (0)