WebStorm 2017.3 EAP, 173.3302: coverage reports for Jest

This week’s WebStorm 2017.3 EAP build (173.3302.13) is now available!

You can update via Toolbox App, or download the build here and install it side by side with your stable WebStorm version.


Download WebStorm 2017.3 EAP

To learn more about the new features added in earlier WebStorm 2017.3 EAP builds, please see these blog posts.

Jest: updating snapshots and coverage reports

A new batch of improvements in the Jest integration had landed in this EAP build.

Now you can see code coverage reports for Jest tests in the IDE. The report will appear after the tests have run (select Run with coverage option instead of just Run), showing how many files were covered with tests and what percentage of lines in them are covered. From the report you can jump to the file and see which lines were covered (marked green) and which were not (marked red).

coverage-report-jest

Jest has a great feature of snapshot testing. If a snapshot doesn’t match the rendered app, the test will fail. That means that either there are changes in your code that caused that or the snapshot is outdated and needs to be updated. You can update the snapshot for a failing test right from the WebStorm test tool window by clicking the “Click to update snapshot” link.

update-snapshot-jest

This will restart the test together with the snapshot update.

Improving completion for JavaScript libraries with TypeScript type declarations

As you may know, type declaration files (also known as type definitions or d.ts files) can improve code completion in JavaScript. This is especially useful when working with test frameworks or libraries written in a very dynamic style that are hard for the IDE to statically analyze.

For a long while you’ve had the option to download and set up type definition files as JavaScript libraries that WebStorm would use under the hood. This is available via Preferences | Languages and Frameworks | JavaScript | Libraries – Download.

Now you can also do the same right from the editor. Press Alt-Enter on the import or require statement, and then select “Install TypeScript definitions for better type information.” Don’t worry – the file will not be saved inside your JavaScript project.

Other improvements in this EAP build include:

  • Support for TypeScript 2.6;
  • The Extract Superclass refactoring is now available for JavaScript and TypeScript classes;
  • New run configuration type “Attach to Node.js/Chrome” that replaces “Chromium Remote” and “Node.js Remote Debug” configurations and allows connecting to the running Node.js process and Chrome.

You can find a list of all addressed issues in the Release notes.

Please share your feedback and report issues on our tracker. Thank you!

WebStorm Team

About Ekaterina Prigara

Ekaterina Prigara is WebStorm product marketing manager at JetBrains. She's passionate about new technologies, UX and coffee.
This entry was posted in Early Access Preview and tagged , . Bookmark the permalink.

4 Responses to WebStorm 2017.3 EAP, 173.3302: coverage reports for Jest

Leave a Reply

Your email address will not be published. Required fields are marked *