title: How to add Sinon to angular 2 testing?
body: <p>I want to add Sinon for testing but I can't get it to run.</p>
  
  <p>I've installed sinon and karma-sinon as DevDependencies.</p>
  
  <p>added sinon to Frameworks in my karma config file.</p>
  
  <pre><code> frameworks: ['jasmine', 'browserify','sinon'],
  </code></pre>
  
  <p>and in my test file I'm trying to declare a spy</p>
  
  <pre><code>let setTokenSpy = sinon.spy(sbHttpObiject, 'checkForToken');
  </code></pre>
  
  <p>and I'm getting</p>
  
  <blockquote>
    <p>TypeScript error: app/sdk/test/http.spec.ts(87,22): Error TS2304:
    Cannot find name 'sinon'.</p>
  </blockquote>
  
  <p>Any help much appreciated! Btw, i think jasmine has also spies but i can't get them to run either, any updates on that?</p>
  
  <p>EDIT----------------------------
  ---------09.09.2016</p>
  
  <p>meanwhile i've found out that I need to install typings like</p>
  
  <blockquote>
    <p>typings install dt~sinon --save --global</p>
  </blockquote>
  
  <p>But now I'm getting this error</p>
  
  <blockquote>
    <p>ReferenceError: Can't find variable: sinon in
    /var/folders/ld/2g86bbq11tddvbnzlzbtg2r80000gn/T/78dc4c45b42a2dd7bfcfb607366d1d15.browserify
    (line 350)</p>
  </blockquote>