Skip to content

Commit b92e640

Browse files
committed
test: Remove listener tests
1 parent 0f14ce4 commit b92e640

File tree

1 file changed

+0
-67
lines changed

1 file changed

+0
-67
lines changed

src/renderer/core/layout/__tests__/TransformPane.test.ts

Lines changed: 0 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -123,73 +123,6 @@ describe('TransformPane', () => {
123123
})
124124
})
125125

126-
describe('canvas event listeners', () => {
127-
it('should add event listeners to canvas on mount', async () => {
128-
const mockCanvas = createMockCanvas()
129-
mount(TransformPane, {
130-
props: {
131-
canvas: mockCanvas
132-
}
133-
})
134-
135-
await nextTick()
136-
137-
expect(mockCanvas.canvas.addEventListener).toHaveBeenCalledWith(
138-
'wheel',
139-
expect.any(Function),
140-
expect.any(Object)
141-
)
142-
expect(mockCanvas.canvas.addEventListener).not.toHaveBeenCalledWith(
143-
'pointerdown',
144-
expect.any(Function),
145-
expect.any(Object)
146-
)
147-
expect(mockCanvas.canvas.addEventListener).not.toHaveBeenCalledWith(
148-
'pointerup',
149-
expect.any(Function),
150-
expect.any(Object)
151-
)
152-
expect(mockCanvas.canvas.addEventListener).not.toHaveBeenCalledWith(
153-
'pointercancel',
154-
expect.any(Function),
155-
expect.any(Object)
156-
)
157-
})
158-
159-
it('should remove event listeners on unmount', async () => {
160-
const mockCanvas = createMockCanvas()
161-
const wrapper = mount(TransformPane, {
162-
props: {
163-
canvas: mockCanvas
164-
}
165-
})
166-
167-
await nextTick()
168-
wrapper.unmount()
169-
170-
expect(mockCanvas.canvas.removeEventListener).toHaveBeenCalledWith(
171-
'wheel',
172-
expect.any(Function),
173-
expect.any(Object)
174-
)
175-
expect(mockCanvas.canvas.removeEventListener).not.toHaveBeenCalledWith(
176-
'pointerdown',
177-
expect.any(Function),
178-
expect.any(Object)
179-
)
180-
expect(mockCanvas.canvas.removeEventListener).not.toHaveBeenCalledWith(
181-
'pointerup',
182-
expect.any(Function),
183-
expect.any(Object)
184-
)
185-
expect(mockCanvas.canvas.removeEventListener).not.toHaveBeenCalledWith(
186-
'pointercancel',
187-
expect.any(Function),
188-
expect.any(Object)
189-
)
190-
})
191-
})
192-
193126
describe('interaction state management', () => {
194127
it('should apply interacting class during interactions', async () => {
195128
const mockCanvas = createMockCanvas()

0 commit comments

Comments
 (0)