Webstorm format on save9/21/2023 ![]() 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: Vitest 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 Vitest from the list. In the Debug tool window, examine the suspended test and step through it. To debug a test, set a breakpoint inside it, click or in the gutter and select Debug from the list. 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 or debug a single test from the editorĬlick or in the gutter and select Run from the list. With WebStorm, you can quickly run or debug a single Vitest test right from the editor or create a run/debug configuration to run or debug 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 Vitest on the Vitest official website. In the embedded Terminal ( Alt+F12), type: ![]() Make sure you have Node.js on your computer. As soon as any changes are made to a test or to its subject, WebStorm re-runs the affected test, you do not even have to re-start the run/debug configuration. When you launch a test session in this mode, WebStorm monitors changes in your project source code. You can re-run failed tests or turn on the watch mode. You can run, debug, do snapshot testing, and measure test coverage both from the editor and via a run/debug configuration. WebStorm integrates with Vitest, a Vite-native unit test framework.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |