title: Writing a jasmine test spec to a javascript closure function
body: <p>I have a Javascript function in a view which is enclosed in a closure. The closure returns a function of the same name and also has some helpers. This is the structure of the method.</p>
  
  <pre><code>this.myMethod = (function () {
  
      function helperMethod(){
          ....
          return true;
      }
      return function myMethod(args){
          helperMethod();
          manipulate();
      }
  }
  </code></pre>
  
  <p>My question is how do I write a Jasmine Unit Test spec to this method. How can I invoke this method ?</p>
  
  <p>Using the default way of methods does not work in this case as it is anonymous.</p>
  
  <pre><code>var view = new myView();
  
      view.myMethod();
  
      expect ( true ).toBeTruthy();
  </code></pre>
  
  <p>Please help in this regard. I am a beginner to Jasmine Framework. </p>