Test case details

Preparation Code

<a class="someClass" id="someElement" href="#">link</a> <script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> <script>   var $t = $("#someElement");   var et = $t.get(0);   function hasClass(el, selector) {    var className = " " + selector + " ";      if ((" " + el.className + " ").replace(/[\n\t]/g, " ").indexOf(className) > -1) {     return true;    }      return false;   } </script>

Test cases

Test #1

$t.is("a.someClass");

Test #2

$t.hasClass("someClass");

Test #3

hasClass(et, 'someClass');