         if @expectIndex >= @descriptor.expect.length
             return 2
         currentExpect = @descriptor.expect[@expectIndex]
-        if eventName isnt currentExpect.event
+        if not @_matchEventName(eventName,currentExpect)
             return 1
         if currentExpect.containsText
             if not @_matchText(args, currentExpect.containsText)

        if @expectIndex is @descriptor.expect.length
            return 2
        return 1

    _matchText : (args, matchRules)->
        str = JSON.stringify(args)

fs = require('fs')
util = require('util')

lodash = require('lodash')
debug = require('debug')
