add active modified-pane test

This commit is contained in:
Bixente Elgart
2026-08-31 21:44:04 -07:00
committed by m4air
parent 5a5dd8442e
commit 04b6d7b29d
@@ -93,6 +93,22 @@ describe('installDiffEditorShiftWheelScroll', () => {
dispose()
})
it('scrolls the modified pane independently', () => {
const original = createPaneFixture()
const modified = createPaneFixture()
const dispose = installDiffEditorShiftWheelScroll({
getOriginalEditor: () => original,
getModifiedEditor: () => modified
})
const event = dispatchWheel(modified.input, { deltaY: 24, shiftKey: true })
expect(event.defaultPrevented).toBe(true)
expect(modified.setScrollLeft).toHaveBeenCalledWith(34)
expect(original.setScrollLeft).not.toHaveBeenCalled()
dispose()
})
it('removes both pane listeners when disposed', () => {
const original = createPaneFixture()
const modified = createPaneFixture()