title: Test a function which contains current time in its return value using jasmine
body: <p>I am testing a function which returns an object. Value of one of its key is current time in miliseconds.
  How can we test it using jasmine?</p>
  
  <pre><code>var fun = function(name,id){
      var obj = {
          name : name,
          id : id,
          createdTime : Date.now()
      }
      return obj;
  }
  
  expect(fun("abc",1)).toBe({name:"abc",id:1,createdTime:Date.now()})
  </code></pre>
  
  <p><code>Date.now()</code> returns 2 different values because main function &amp; test case both runs at different time.</p>