Provides touch events to developers using Node.js to develop for browsers.
const touchevents = require('touch-events2') // Also at window.touchevents.
// Default target is: document.body
// Default events are: ["touchstart", "touchend", "touchmove"]
var touch = touchevents()
touch.on("touchstart", function(event) {
console.log(event)
})
var touch = window.touchevents(document)
var touch = window.touchevents(['touchcancel'])
var touch = window.touchevents(document, ['touchcancel'])
- Mocha
- Test functionality in Node.js
- Karma
- Using browserify, test functionality in browsers
- User Testing
- grunt user-test is set to build, serve, and open test/index.html