Running jest tests directly in Intellij Idea/WebStorm?

slnowak

I'm using jest to write tests in my ReactJS application. So far, to run my test suite, I need to type 'npm test'.

Here's the snippet from package.npm:

 "scripts": {
    "test": "./node_modules/.bin/jest",
    (other stuff)
  },
  "jest": {
    "unmockedModulePathPatterns": ["<rootDir>/node_modules/react"],
    "scriptPreprocessor": "<rootDir>/node_modules/babel-jest",
    "testFileExtensions": [
      "es6",
      "js"
    ],
    "moduleFileExtensions": [
      "js",
      "json",
      "es6"
    ]
  },

Is it possible to run those tests within my IDE (IDEA/WebStorm) directly, preserving the configuration? I'm not a js guy, but for example WebStrom works perfectly fine with Karma. Shouldn't this be possible with jest-cli either?

lena

To make Jest test results shown in a tree view (like karma, etc.), a special integration is needed. WebStorm doesn't yet support Jest. Please vote for WEB-14979 to be notified on any progress.


EDIT: as of March 2017 the first version of Jest integration at WebStorm has been released.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

In what order are Jest tests running?

From Dev

Running Unit and Integration Tests in IntelliJ

From Dev

Running Spark Unit Tests in IntelliJ

From Dev

IntelliJ running tests one by one

From Dev

IntelliJ NoClassDefFoundError when running IntelliJ Tests

From Dev

Running Cucumber tests directly from executable jar

From Dev

Running Jest tests in Vue.js

From Dev

Gradle project running jUnit 5 tests in IntelliJ

From Dev

Gradle project running jUnit 5 tests in IntelliJ

From Java

"No tests found for given includes" when running Gradle tests in IntelliJ IDEA

From Dev

"No tests found for given includes" when running Gradle tests in IntelliJ IDEA

From Dev

Jest cannot handle TypeScript TSX files when running tests

From Dev

Pass properties to maven profile while running tests in intellij

From Dev

OpenEJB Logger configuration when running tests from TestNG in Intellij IDEA

From Dev

Play framework 2 running unit tests in Intellij IDEA 13

From Dev

ActiveMQ in-memory broker not starting when tests running in IntelliJ IDEA

From Dev

Intellij complains about fork mode when running tests with code cover

From Dev

Play framework 2 running unit tests in Intellij IDEA 13

From Dev

ActiveMQ in-memory broker not starting when tests running in IntelliJ IDEA

From Dev

Intellij is not running individual Spock tests in Grails any more

From Dev

Running Jest from Visual Studio Code in Windows results in no tests being found

From Java

Jest passing variables to tests

From Dev

Reusing Jest unit tests

From Java

Why am I getting this error when running Scala 2.13 tests in IntelliJ, but not with Scala 2.12?

From Dev

IntelliJ IDEA 13: Keyboard shortcuts to navigate stack trace after running tests?

From Dev

How to automate running tests before commit in Intellij Idea, without additional software?

From Dev

java.lang.ClassNotFoundException: IntegrationSpec while running specs2 Tests in Intellij 14

From Dev

Jest and Bower Module loading in jest tests

From Java

Disable tests compilation in Intellij

Related Related

  1. 1

    In what order are Jest tests running?

  2. 2

    Running Unit and Integration Tests in IntelliJ

  3. 3

    Running Spark Unit Tests in IntelliJ

  4. 4

    IntelliJ running tests one by one

  5. 5

    IntelliJ NoClassDefFoundError when running IntelliJ Tests

  6. 6

    Running Cucumber tests directly from executable jar

  7. 7

    Running Jest tests in Vue.js

  8. 8

    Gradle project running jUnit 5 tests in IntelliJ

  9. 9

    Gradle project running jUnit 5 tests in IntelliJ

  10. 10

    "No tests found for given includes" when running Gradle tests in IntelliJ IDEA

  11. 11

    "No tests found for given includes" when running Gradle tests in IntelliJ IDEA

  12. 12

    Jest cannot handle TypeScript TSX files when running tests

  13. 13

    Pass properties to maven profile while running tests in intellij

  14. 14

    OpenEJB Logger configuration when running tests from TestNG in Intellij IDEA

  15. 15

    Play framework 2 running unit tests in Intellij IDEA 13

  16. 16

    ActiveMQ in-memory broker not starting when tests running in IntelliJ IDEA

  17. 17

    Intellij complains about fork mode when running tests with code cover

  18. 18

    Play framework 2 running unit tests in Intellij IDEA 13

  19. 19

    ActiveMQ in-memory broker not starting when tests running in IntelliJ IDEA

  20. 20

    Intellij is not running individual Spock tests in Grails any more

  21. 21

    Running Jest from Visual Studio Code in Windows results in no tests being found

  22. 22

    Jest passing variables to tests

  23. 23

    Reusing Jest unit tests

  24. 24

    Why am I getting this error when running Scala 2.13 tests in IntelliJ, but not with Scala 2.12?

  25. 25

    IntelliJ IDEA 13: Keyboard shortcuts to navigate stack trace after running tests?

  26. 26

    How to automate running tests before commit in Intellij Idea, without additional software?

  27. 27

    java.lang.ClassNotFoundException: IntegrationSpec while running specs2 Tests in Intellij 14

  28. 28

    Jest and Bower Module loading in jest tests

  29. 29

    Disable tests compilation in Intellij

HotTag

Archive