Skip to content

Commit 30f90b2

Browse files
test(web): keep pull request menu items private
1 parent d2c3e2e commit 30f90b2

2 files changed

Lines changed: 2 additions & 9 deletions

File tree

‎apps/web/src/components/pullRequest/pullRequestLinkContextMenu.test.ts‎

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,8 @@
11
import { describe, expect, it } from "vite-plus/test";
22

3-
import { openOnHostLabel, pullRequestLinkContextMenuItems } from "./pullRequestLinkContextMenu";
3+
import { openOnHostLabel } from "./pullRequestLinkContextMenu";
44

55
describe("pull request link context menu", () => {
6-
it("offers the copy first and the host's own page after it", () => {
7-
expect(pullRequestLinkContextMenuItems("Open on GitHub")).toEqual([
8-
{ id: "copy-link", label: "Copy link", icon: "copy" },
9-
{ id: "open-external", label: "Open on GitHub" },
10-
]);
11-
});
12-
136
it("names every host it knows, and says nothing false about one it does not", () => {
147
expect(openOnHostLabel("github")).toBe("Open on GitHub");
158
expect(openOnHostLabel("gitlab")).toBe("Open on GitLab");

‎apps/web/src/components/pullRequest/pullRequestLinkContextMenu.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export const openOnHostLabel = (provider: string): string =>
1919
OPEN_ON_HOST_LABELS[provider] ?? "Open on host";
2020

2121
/** Copy first: it is the reason to right-click a number rather than click it. */
22-
export function pullRequestLinkContextMenuItems(
22+
function pullRequestLinkContextMenuItems(
2323
openLabel: string,
2424
): readonly ContextMenuItem<PullRequestLinkContextMenuAction>[] {
2525
return [

0 commit comments

Comments
 (0)