Search code examples
angularjsjasminegulpwebstormyeoman-generator

WebStorm: Specs are showing unknown functions


First time to use Angular.js - started a few days ago. I got set up using the gulp angular yeoman generator.

In WebStorm, my specs are showing unknown symbols: it, describe are unknown, as well as assertions like toEqual

However, tests run ok using gulp from the cmd-line.

enter image description here

How can I tell tell WebStorm where to find these symbols?


Solution

  • The WebStorm should have picked up all you dependencies from your bower file automatically. Did yeoman generate bower.json file for you?

    In any case, you can add additional library support in WebStorm (docs). Go to:

    • Windows & Linux: File | Settings | Languages and Frameworks | JavaScript | Libraries
    • OSX: WebStorm | Preferences | Languages and Frameworks | JavaScript | Libraries

    and add jasmine or karma-jasmine there. Also, see this SO answers.