title: Checking date format in Karma Jasmine unit test case
body: <p>I'm having a logic that converts date to new Date()</p>
  
  <pre><code>$scope.isValidatStartDate=function("2016-05-04")
  {
     var dateList = date.split("-");
     $scope.endMaxDate = new Date(dateList[0], dateList[1] - 1, dateList[2]);
  }
  </code></pre>
  
  <p>I have written test case to check whether the passed date is in the format of new Date();</p>
  
  <pre><code>  it("Expect date should be validated", function () {
              var date = "2016-05-04";
              scope.isValidatStartDate(date);
              expect(scope.endMaxDate).toBe("Wed May 04 2016 00:00:00 GMT+0530 (India Standard Time)");
          });
  </code></pre>
  
  <p>But the test is failing as the message in the <strong>Karma debugger console</strong> says..</p>
  
  <blockquote>
    <p>debug.html:38 Expected Date(Wed May 04 2016 00:00:00 GMT+0530 (India
    Standard Time)) to be 'Wed May 04 2016 00:00:00 GMT+0530 (India
    Standard Time)'.</p>
  </blockquote>
  
  <p>The test expects Date object to be string.Hence it is failing.How can I check instead of string if the date object is really a date object?</p>