title: How to mock a function inside another function (which I am testing) using sinon?
body: <p>let's say i have a function</p>
  
  <pre><code>Func a() {
      //Do Something
      let c = b();
      return c;
  }
  </code></pre>
  
  <p>I want to test the function a and mock b() and in the mock want to assign c.
  Sinon.Stub(Test,"b").returns("DummyValue");
  c should be assigned DummyValue.</p>
  
  <p>How can I do that?</p>
  
  <pre><code>describe("a", () =&gt; {
      let a = a();
      //mock b();
      action = execute(a);
      expect(action).should.return.("DummyValue");
  })
  </code></pre>