Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add Jasmine autocomplete to WebStorm 7.0

I search around the net but did't find a concrete answer. Please help - How to add Jasmine autocomplete to WebStorm?

like image 316
Aleksandrenko Avatar asked Feb 22 '14 21:02

Aleksandrenko


2 Answers

Here's the step-by-step process for adding library definitions, which are provided courtesy of borisyankov/DefinitelyTyped at GitHub.

  1. In WebStorm, open the Settings dialog (File > Settings).

  2. Under the Project Settings category, navigate to JavaScript > Libraries.

  3. Click the Download button on the right side. This opens the Download Library dialog.

  4. Select "TypeScript community stubs" from the combo box.

  5. Find the library you're looking for, select it and click Download and Install.

To restrict usage of a library definition to specific files/folders, use the Manage Scopes dialog. In your case, you might consider it appropriate to only show Jasmine autocomplete in your test spec folder.

NOTE: Even though the dialog is named Download Library, this process is only for downloading the definition of the library (method signatures, types, etc). You still need to download the actual library yourself to use it.

like image 74
Eric Avatar answered Nov 11 '22 20:11

Eric


You have to download jasmine.js and configure it as a library (Settings/javaScript/Libraries, Add...)

like image 5
lena Avatar answered Nov 11 '22 20:11

lena