| ... | @@ -50,9 +50,9 @@ describe("isLineInFileDiff", () => { | ... | @@ -50,9 +50,9 @@ describe("isLineInFileDiff", () => { |
| 50 | describe("isFileDiffCollapsed", () => { | 50 | describe("isFileDiffCollapsed", () => { |
| 51 | const NO_TOGGLES: ReadonlySet<string> = new Set(); | 51 | const NO_TOGGLES: ReadonlySet<string> = new Set(); |
| 52 | | 52 | |
| 53 | it("folds every file before the reader has touched anything", () => { | 53 | it("opens every file before the reader has touched anything", () => { |
| 54 | expect(isFileDiffCollapsed("a.ts", null, NO_TOGGLES)).toBe(true); | 54 | expect(isFileDiffCollapsed("a.ts", null, NO_TOGGLES)).toBe(false); |
| 55 | expect(isFileDiffCollapsed("b.ts", null, NO_TOGGLES)).toBe(true); | 55 | expect(isFileDiffCollapsed("b.ts", null, NO_TOGGLES)).toBe(false); |
| 56 | }); | 56 | }); |
| 57 | | 57 | |
| 58 | it("opens every file once the toolbar has asked for it", () => { | 58 | it("opens every file once the toolbar has asked for it", () => { |
| ... | @@ -66,12 +66,12 @@ describe("isFileDiffCollapsed", () => { | ... | @@ -66,12 +66,12 @@ describe("isFileDiffCollapsed", () => { |
| 66 | expect(isFileDiffCollapsed("b.ts", "folded", NO_TOGGLES)).toBe(true); | 66 | expect(isFileDiffCollapsed("b.ts", "folded", NO_TOGGLES)).toBe(true); |
| 67 | }); | 67 | }); |
| 68 | | 68 | |
| 69 | it("keeps a file the reader opened open as the next slice arrives", () => { | 69 | it("keeps a file the reader folded closed as the next slice arrives", () => { |
| 70 | // The file keys grow with every slice, so the answer for one already open must not depend on | 70 | // The file keys grow with every slice, so the answer for one already folded must not depend |
| 71 | // how many of them there are by then. | 71 | // on how many of them there are by then. |
| 72 | const toggled = new Set(["b.ts"]); | 72 | const toggled = new Set(["b.ts"]); |
| 73 | expect(isFileDiffCollapsed("b.ts", null, toggled)).toBe(false); | 73 | expect(isFileDiffCollapsed("b.ts", null, toggled)).toBe(true); |
| 74 | expect(isFileDiffCollapsed("c.ts", null, toggled)).toBe(true); | 74 | expect(isFileDiffCollapsed("c.ts", null, toggled)).toBe(false); |
| 75 | }); | 75 | }); |
| 76 | | 76 | |
| 77 | it("still answers to a toggle after either toolbar press", () => { | 77 | it("still answers to a toggle after either toolbar press", () => { |