We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 32ad741 commit b55ffc1Copy full SHA for b55ffc1
src/__tests__/events.js
@@ -376,6 +376,16 @@ test('assigns clipboardData properties', () => {
376
expect(clipboardData.getData('text')).toBe('example')
377
})
378
379
+test('assigns read-only target properties', () => {
380
+ const node = document.createElement('div')
381
+ const spy = jest.fn()
382
+ node.addEventListener('scroll', spy)
383
+
384
+ expect(node.scrollWidth).toBe(0)
385
+ fireEvent.scroll(node, {target: {scrollWidth: 10}})
386
+ expect(node.scrollWidth).toBe(10)
387
+})
388
389
test('fires events on Window', () => {
390
const messageSpy = jest.fn()
391
window.addEventListener('message', messageSpy)
0 commit comments