         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)

fs = require('fs')

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

    getExpectingEventName : ()->
        if @expectIndex >= @descriptor.expect.length
            return null
        expectedEvent = @descriptor.expect[@expectIndex].event
        if typeof expectedEvent is 'string'
            return expectedEvent
        if util.isArray(expectedEvent)
            return expectedEvent.join(' or ')
        return null
        
    # 1 means waiting, 2 means fully matched
    # we are not reject anything, if the expected event
    # does not showup, we will detect a timeout for waiting
