title: How to test angular filter which depend of moment.js?
body: <p>I have simple filter which depends of moment.js:</p>
  
  <pre><code>app.filter('fromNow', function() {
    return function(date) {
      return moment(date).fromNow();
    }
  });
  </code></pre>
  
  <p>Have can i write unit test of this in jasmine ?</p>
  
  <p>EDIT:
  now i have </p>
  
  <pre><code>ReferenceError: moment is not defined
  </code></pre>
  
  <p>when write like that:</p>
  
  <pre><code>describe("fromNow filter", function(){
   var moment;
   beforeEach(function(){
     module('reports');
     moment = jasmine.createSpy();
    });
  
  
    it("should output string when input string",
      inject(function(fromNowFilter) {
        fromNowFilter("string");
    }));
  })
  </code></pre>