     el[key] = value for key, value of attrs
     return el
 
+fire = (type, element, x, y) ->
+    event = document.createEvent('Event')
+    touch = pageX: x or 0, pageY: y or 0, target: element
+
+    event.initEvent('touch' + type, true, true)
+    event.touches = [touch]
+
+    element.dispatchEvent event
+
+down = (element, x, y) -> fire 'start', element, x, y
+move = (element, x, y) -> fire 'move', element, x, y
+up = (element) -> fire 'end', element
+
+class Number.Counter
+    constructor: (@index = 0) ->
+    valueOf: -> @index
+    toString: -> @index.toString()
+    step: => ++@index
+
 suite 'TouchEvents', ->
 
     test 'tap', (done) ->
         element = $('.a').get(0)
-        count = 0
-
-        DOMEvents.addListener element, 'tap', -> count++
-        down(element, 10, 10)
-        up(element)
-
-        setTimeout ->
-            assert.equal count, 1
+        counter = new Number.Counter
+
+        DOMEvents.addListener element, 'tap', counter.step
+        down(element, 10, 10)
+        up(element)
+
+        setTimeout ->
+            assert.equal counter, 1
             DOMEvents.removeListener element, '*'
             done()
         , 0

            up(element)

            setTimeout ->
                assert.equal singleCount, 0
                assert.equal doubleCount, 1
                DOMEvents.removeListener element, '*'
                done()
            , 100

            up(element)

            setTimeout ->
                assert.equal counter, 2
                DOMEvents.removeListener element, '*'
                done()
            , 0
