       e.which = 52 # '4'
       $number.trigger(e)
 
-      assert.equal $number.val(), '4242 4'
+      setTimeout ->
+        assert.equal $number.val(), '4242 4'
+        done()
 
   describe 'formatCardExpiry', ->
-    it 'should format month shorthand correctly', ->
+    it 'should format month shorthand correctly', (done) ->
       $expiry = $('<input type=text>').payment('formatCardExpiry')
 
       e = $.Event('keypress');
       e.which = 52 # '4'
       $expiry.trigger(e)
 
-      assert.equal $expiry.val(), '04 / '
-
-    it 'should format forward slash shorthand correctly', ->
+      setTimeout ->
+        assert.equal $expiry.val(), '04 / '
+        done()
+
+    it 'should format forward slash shorthand correctly', (done) ->
       $expiry = $('<input type=text>').payment('formatCardExpiry')
       $expiry.val('1')
 

      e.which = 100 # 'd'
      $expiry.trigger(e)

      assert.equal $expiry.val(), '1'

      e.which = 47 # '/'
      $expiry.trigger(e)

      setTimeout ->
        assert.equal $expiry.val(), '01 / '
        done()

    it 'should only allow numbers', (done) ->
      $expiry = $('<input type=text>').payment('formatCardExpiry')
      $expiry.val('1')

