Webstorm logo

The WebStorm Blog

The Smartest JavaScript IDE

Releases

WebStorm 7.0.2 is available: Mocha integration and improved Dart support

Today you can update WebStorm to its latest version 7.0.2. There are three good reasons for that.

First, we significantly improved support for Dart language and added new features that are available in the recent Google Dart SDK update.

  • Start debugging Dart code in Dartium is much easier now: WebStorm detects Dart projects and start Debug session in Dartium by default.
  • Upgrade dependencies and pub build commands are now available right in the context menu for pubspec.yaml file.

Update: read Getting started with Dart tutorial.

Second, we added Mocha test framework integration. Install Mocha with npm, create new Mocha Run/Debug Configuration, specify the test directory and run your tests in one click. Watch a screencast by John Lindquist on using Mocha in your project.

http://www.youtube.com/watch?v=4mKiGkokyx8

And finally, we made dozens of fixes and minor improvements. For example, now you can enjoy code completion for Flexbox CSS properties.

You can install update from the IDE or download the installation file from the product web site. Have a look at the release notes.

Develop with pleasure!
WebStorm Team

Comments below can no longer be edited.

27 Responses to WebStorm 7.0.2 is available: Mocha integration and improved Dart support

  1. Avatar

    Nick Middleweek says:

    November 12, 2013

    Nice video, for the most part the video was blurry but I guess we get the idea.

    Is there a section on customising IntelliJ IDEA to have these new features and which plugins we need to install?

    Cheers,
    Nick

    • Ekaterina Prigara

      Ekaterina Prigara says:

      November 12, 2013

      Hi Nick,

      I think it could be fixed by selecting better video quality (720p HD is available).

      These features should be available in IDEA 13 (you can try Beta now) as plugins.

    • Avatar

      Sergey Simonchik says:

      November 12, 2013

      Mocha support is available as a part of NodeJS plugin.
      And all Dart features are packed into Dart plugin.

  2. Avatar

    Marjorie Roswell says:

    November 12, 2013

    how to install from the IDE?

    • Ekaterina Prigara

      Ekaterina Prigara says:

      November 12, 2013

      Unfortunately, there is no patch from WebStorm 7.0 (fresh install is required), but if your have 7.0.1 it should be easy to update – Check for updates (in main menu).

  3. Avatar

    AW says:

    November 12, 2013

    Anyone have experience with the Dart support? Any better than the Eclipse IDE?

    • Ekaterina Prigara

      Ekaterina Prigara says:

      November 12, 2013

      You can read about Dart support in WebStorm in this post: https://blog.jetbrains.com/webide/2012/12/dart-support-in-webstorm-6/
      It provides code completion, error-detection, refactorings, navigation.
      In WebStorm 7 (and the latest version of Dart plugin if you are using other JetBrains IDE) we made it much easier to start Dart debug and preview files in Dartium and made a lot of other improvements.

  4. Meet WebStorm 8 Development Roadmap | JetBrains WebStorm Blog says:

    November 13, 2013

    […] Issue Tracker ← WebStorm 7.0.2 is available: Mocha integration and improved Dart support […]

  5. Avatar

    Jeremie Weldin says:

    November 13, 2013

    Anyone else having issues with javascript debugging on mac with chrome since updating to 7.0.2?

    Now it hangs and I get this in the console: GET http://localhost:63342/FDFA6052-1C12-4655-B658-0DBF2414422D/48/aHR0cDovL2x…S9qcy9tb2JpbGUtc2l0ZS1jdXN0b20tanFtLWRlZmF1bHRzLmpzP189MTM4NDM2MzYwOTExNA== 404 (Not Found) aHR0cDovL2xvY2FsaG9zdDo2MzM0Mi9qcXVlcnktbW9iaWxlL21vYmlsZS9qcy9tb2JpbGUtc2l0ZS1jdXN0b20tanFtLWRlZmF1bHRzLmpzP189MTM4NDM2MzYwOTExNA==

    Mac OS X 10.9
    Chrome 31.0.1650.48

    Worked fine just before I ran the update.
    I have also tried restarting, changing the port on the debugger and the javascript debug config.

  6. Avatar

    martin says:

    December 10, 2013

    Hi, this is awesome, is there any way to use chai and sinon with mocha in webstorm ?

    • Ekaterina Prigara

      Ekaterina Prigara says:

      December 10, 2013

      You can use Chai for sure. Have a look at the video in the post – John is using Chai.

  7. Avatar

    Brainenjii says:

    December 12, 2013

    What about coverage with mocha?

  8. Avatar

    Alex Schenkman says:

    January 10, 2014

    Hi, about the mocha plugin:

    1) How can run only one test instead of the whole test folder?
    This is handy to avoid running the whole suite while working only on one file.

    2) Is there any Coffeescript support?
    In the command line I can add –compilers coffee:coffee-script to let Mocha run my coffee test. Then I even get stacktraces with coffee line numbers.
    Webstorm runs the tests as js, and give the stacktrace in js line numbers.

    3) This runs my tests twice, if there is a mocha.opts present in the test folder.
    Once for the coffee version, and once for the js version.

    Thanks!

    • Avatar

      max says:

      February 9, 2014

      +1

    • Avatar

      olanod says:

      March 20, 2014

      +1

    • Avatar

      Gleb Kholodov says:

      March 20, 2014

      Feels like the Mocha configuration page is missing an entry for “additional parameters” or at least the -g parameter, which allows specifying a filter for TCs to run. Ideally, of course, you should be able to just select a couple of files or a region in a single test file and hit “run these”.

    • Avatar

      Gleb Kholodov says:

      March 20, 2014

      Actually, Mocha seems to provide a code-level TC filter: just prepend “.only” after your “describe”, “it” or “test”. However, WStorm goes bananas when it sees it and instead of only showing the TCs you selected, it hides the entire file that contains them, while showing all those tests that were filtered out. Looks like a feature that was missed out or not yet implemented.

      • Avatar

        Sergey Simonchik says:

        March 21, 2014

        Indeed, WebStorm 7.0.3 doesn’t handle “*.only” constructions well.
        This was fixed in WebStorm 8.0. Please try WebStorm 8 EAP it should work correctly there.

    • Avatar

      Sergey Simonchik says:

      March 21, 2014

      Thanks for the feedback!
      1) No, it isn’t avaible right now. Please track http://youtrack.jetbrains.com/issue/WEB-10067.

      2) & 3) Alex, your issue http://youtrack.jetbrains.com/issue/WEB-10736 will be fixed in WebStorm 8.0.x or WebStorm 9.

  9. Avatar

    Maryna Cherniavska says:

    February 14, 2014

    Can’t get Mocha test to run from WS. Getting this:
    timers.js:116
    process.nextTick(function() {
    ^
    TypeError: Object # has no method ‘nextTick’

    I have the node and mocha directories in debug config unchanged, and just the test directory set up manually as shown in video. Any idea what I’m doing wrong?

    • Ekaterina Prigara

      Ekaterina Prigara says:

      February 14, 2014

      This error is thrown by Mocha, so most probably there’s something wrong with your code and not with the debug configuration. Do you have the same error when you start your tests with Mocha in the terminal?
      You can contact our support (https://intellij-support.jetbrains.com/anonymous_requests/new) and submit timers.js file.

  10. Hello World – Unit Test | Vish Kari says:

    March 5, 2014

    […] For those of you’ll who’ve been following the previous post and have decided to use WebStorm, here’s  how you can hook up Mocha in WebStorm – it’s real easy. Once you go through the video […]

  11. Avatar

    Tony says:

    May 30, 2014

    Mocha plugin is no longer registered in plugins repo.
    Can’t install it for IDEA 13.1.3

    • Avatar

      Sergey Simonchik says:

      May 30, 2014

      Mocha support is available as a part of NodeJS plugin. There is no Mocha plugin in the plugin repository.
      Try to install NodeJS plugin.

  12. Avatar

    spencer says:

    September 10, 2014

    Thanks for this!