title: How to run a js function in Jasmine?
body: <p>I am able to run a jasmine test on a js file, but it does not seem that I can run any functions from within the testing framework.</p>
  
  <p>Here is the JS file jasmine_test.js</p>
  
  <pre><code>$(document).ready(function() {
      function hello(){
          console.log("yo")
      }
  
      hello()
  
  });
  </code></pre>
  
  <p>here is the form_detail_spec.js</p>
  
  <pre><code>describe("tthe things", function(){
      it("testing the things", function(){
          var array = ["one"];
          //isOptionalEmailForm(array);
          //expect(isOptionalEmailForm(array)).toBe(true);
          hello()
          expect(1).toBe(1);
  
      }); 
  });
  </code></pre>
  
  <p>When I run the spec file, I get the following error in the jasmine console:</p>
  
  <pre><code>ReferenceError: hello is not defined
  </code></pre>
  
  <p>the spec does not pass. If I remove hello() from the test, it works beautifully. </p>
  
  <p>here is the specrunner.html file</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
    &lt;meta charset="utf-8"&gt;
    &lt;title&gt;Jasmine Spec Runner v2.2.0&lt;/title&gt;
  
    &lt;link rel="shortcut icon" type="image/png" href="lib/jasmine-2.2.0/jasmine_favicon.png"&gt;
    &lt;link rel="stylesheet" href="lib/jasmine-2.2.0/jasmine.css"&gt;
  
    &lt;script type="text/javascript" src="../js/vendor/jquery/jquery-1.11.2.js"&gt;&lt;/script&gt;
    &lt;script src="lib/jasmine-2.2.0/jasmine.js"&gt;&lt;/script&gt;
    &lt;script src="lib/jasmine-2.2.0/jasmine-html.js"&gt;&lt;/script&gt;
    &lt;script src="lib/jasmine-2.2.0/boot.js"&gt;&lt;/script&gt;
    &lt;script type="text/javascript" src="../js/vendor/bootstrap/bootstrap.min.js"&gt;&lt;/script&gt;
    &lt;script type="text/javascript" src="../js/vendor/bootstrap/bootstrapValidator.min.js"&gt;&lt;/script&gt;
    &lt;script type="text/javascript" src="../js/validator_parameters.js"&gt;&lt;/script&gt;
  
    &lt;!-- include source files here... --&gt;
    &lt;!-- &lt;script src="src/Player.js"&gt;&lt;/script&gt; --&gt;
    &lt;!--  &lt;script src="src/Song.js"&gt;&lt;/script&gt; --&gt;
    &lt;script src="../js/jasmine_test.js"&gt;&lt;/script&gt;
  
    &lt;!-- include spec files here... --&gt;
    &lt;!--    &lt;script src="spec/SpecHelper.js"&gt;&lt;/script&gt; --&gt;
    &lt;!-- &lt;script src="spec/PlayerSpec.js"&gt;&lt;/script&gt; --&gt;
    &lt;script src="spec/form_details_spec.js"&gt;&lt;/script&gt; 
  
  &lt;/head&gt;
  
  &lt;body&gt;
  &lt;/body&gt;
  &lt;/html&gt; 
  </code></pre>