-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathspec.js
29 lines (24 loc) · 963 Bytes
/
spec.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/* eslint-disable */
import pathnameToRoute from "./src/libs/helpers/pathnameToRoute";
import ROUTES from "./src/libs/ROUTES";
test("pathnameToRoute", () => {
expect(pathnameToRoute("/frontend/frontend/issues/2751")).toBe(ROUTES.ISSUE);
expect(pathnameToRoute("/gitlab-org/gitlab-ce/issues/32954")).toBe(
ROUTES.ISSUE
);
expect(pathnameToRoute("/frontend/frontend/issues")).toBe(ROUTES.ISSUES);
expect(pathnameToRoute("/gitlab-org/gitlab-ce/issues")).toBe(ROUTES.ISSUES);
expect(pathnameToRoute("/frontend/frontend/merge_requests/1800")).toBe(
ROUTES.MR
);
expect(pathnameToRoute("/gitlab-org/gitlab-ce/merge_requests/11726")).toBe(
ROUTES.MR
);
expect(
pathnameToRoute("/gitlab-org/gitlab-ce/merge_requests/11726/commits")
).toBe(ROUTES.MR);
expect(pathnameToRoute("/frontend/frontend/merge_requests")).toBe(ROUTES.MRS);
expect(pathnameToRoute("/gitlab-org/gitlab-ce/merge_requests")).toBe(
ROUTES.MRS
);
});