nl_tokens: Validate if element s DOM node has text
pl_tokens: function toHaveText ( ) { return { compare : function compare ( <mask> , text ) { var regexp = text instanceof RegExp ? text : new RegExp ( text , 'ig' ) ; var pass = element . getDOMNode ( ) . textContent . match ( regexp ) ; var message = pass ? 'Text "' + text + '" is found within an element' : 'Text "' + text + '" is not found within an element' ; return { pass : pass , message : message } ; } } ; }