title: Testing Angular JS with WebStorm: unresolved function or method inject()
body: <p>I'm developing web an app using AngularJS + TypeScript, and Karma + Jasmine for testing purposes. </p>
  
  <p>The problem is that WebStorm continues pestering me with the following error, despite the fact that all of my tests compile well:</p>
  
  <blockquote>
    <p>Unresolved function or method inject()</p>
  </blockquote>
  
  <p><a href="https://i.stack.imgur.com/ndZuN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ndZuN.png" alt="enter image description here"></a></p>
  
  <p>I've added angular-mocks typings:</p>
  
  <p><a href="https://i.stack.imgur.com/nlMPq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nlMPq.png" alt="enter image description here"></a></p>
  
  <p>and provided angular-mocks JavaScript library for IDE:</p>
  
  <p><a href="https://i.stack.imgur.com/i7lqQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/i7lqQ.png" alt="enter image description here"></a></p>
  
  <p>But the problem still exists. I know that as a workaround, one can declare corresponding variable, but honestly I don't really think that this is a good approach.</p>