Skip to content

Commit 711f7c3

Browse files
committed
test(view): adds skip-multiple-invisible down direction test
Adds symmetric test coverage for skipping multiple invisible repos when moving down, complementing the existing up-direction test.
1 parent fc27cd0 commit 711f7c3

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

tests/stores/view-lock.test.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ describe("view lock store", () => {
108108
expect(viewState.lockedRepos).toEqual(["org/hidden", "org/c", "org/a"]);
109109
});
110110

111-
it("skips multiple invisible repos", () => {
111+
it("skips multiple invisible repos when moving up", () => {
112112
lockRepo("org/a");
113113
lockRepo("org/h1");
114114
lockRepo("org/h2");
@@ -117,6 +117,15 @@ describe("view lock store", () => {
117117
expect(viewState.lockedRepos).toEqual(["org/d", "org/a", "org/h1", "org/h2"]);
118118
});
119119

120+
it("skips multiple invisible repos when moving down", () => {
121+
lockRepo("org/a");
122+
lockRepo("org/h1");
123+
lockRepo("org/h2");
124+
lockRepo("org/d");
125+
moveLockedRepo("org/a", "down", new Set(["org/a", "org/d"]));
126+
expect(viewState.lockedRepos).toEqual(["org/h1", "org/h2", "org/d", "org/a"]);
127+
});
128+
120129
it("no-op when already first visible and moving up", () => {
121130
lockRepo("org/h1");
122131
lockRepo("org/a");

0 commit comments

Comments
 (0)