I am trying to create a touch event for a unit test. After reading https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent, I expected that I would be able to do:
It looks like
document.createEvent('TouchEvent');
works if you are using an actual mobile device or mobile emulation.