

This can be a specific test or suite, an entire test file, or a folder with test files. To change this predefined setting, specify the path to the desired folder. By default, the Working directory field shows the project root folder.

Specify the working directory of the application. Specify the location of the jest, react-scripts, react-script-ts, react-super-scripts, or react-awesome-scripts package.
JEST WEBSTORM DEBUG WINDOWS
See Configuring remote Node.js interpreters, Configuring a local Node.js interpreter, and Using Node.js on Windows Subsystem for Linux for details. You can also choose another configured local or remote interpreter or click and configure a new one. In most cases, WebStorm detects the project default interpreter and fills in the field itself. If you choose the Project alias, WebStorm will automatically use the project default interpreter from the Node interpreter field on the Node.js page. The Run/Debug Configuration: Jest dialog opens.Īlternatively, select a test file in the Project tool window and select Create from the context menu. Open the Run/Debug Configuration dialog ( Run | Edit Configurations on the main menu), click in the left-hand pane, and select Jest from the list. In the Project tool window, select the folder with the tests, and then select Run 'Tests in '. Run all tests in a folder from the Project tool window You can also see whether a test has passed or failed right in the editor, thanks to the test status icons and in the gutter. Run a single test from the editorĬlick or in the gutter and select Run from the list.
JEST WEBSTORM DEBUG HOW TO
With WebStorm, you can quickly run a single Jest test right from the editor or create a run/debug configuration to execute some or all of your tests.įor information on how to create Vitest tests for JavaScript and TypeScript code, see Vitest features on the Vitest official website. Learn more from Getting Started and Configuring Jest on the Jest official website.

In the embedded Terminal ( Alt+F12), type: Make sure you have Node.js on your computer. Test status is shown next to the test in the editor with an option to quickly run it or debug it. You can see the test results in a treeview and easily navigate to the test source from there. You can run and debug tests with Jest right in WebStorm. Learn more about the platform from the Jest official website. Is there something I should be doing with my jest-config.json file? It currently looks like this.Jest is a testing platform for client-side JavaScript applications and React applications specifically. I can't just not send "testTimeout" as it's not under my control. I'm not sure what to configure / tweak / change / fix to get this working. I'm working on a Vue.js 2.x project with Jest tests and, although I can run them fine, I can't debug them at all in Rider / WebStorm as I get the following error (paths abbreviated.) /home/me/.nvm/versions/node/v14.21.2/bin/node -require /usr/share/rider/plugins/javascript-impl/helpers/jest-intellij/lib/jest-intellij-stdin-fix.js test:unit -runInBand -testTimeout=10000000 -colors -reporters /usr/share/rider/plugins/javascript-impl/helpers/jest-intellij/lib/jest-intellij-reporter.js -verbose -testNamePattern=^VIEW: log-in shows a form where you can log in -runTestsByPath /home/me/Development/Repositories/MyApp/src/MyApp.Web/ClientApp/tests/unit/views/ĭebugger listening on ws://127.0.0.1:44527/c71be107-86f0-4e2f-ae31-2ebdd8c8892d
