Running Nodeunit Tests
IntelliJ IDEA supports integration with the nodeunit framework thus enabling running unit test for Node.js applications.
To create and run unit tests for a Node.js application, perform these general steps
This topic provides guidelines in Node.js-specific unit testing procedures. For general information on testing in IntelliJ IDEA, see the section Testing.
To enable unit testing for Node.js applications
Install and enable the Node.js plugin.
The plugin is not bundled with IntelliJ IDEA, but it is available from the JetBrains plugin repository. Once enabled, the plugin is available at the IDE level, that is, you can use it in all your IntelliJ IDEA projects. See Installing, Updating and Uninstalling Repository Plugins and Enabling and Disabling Plugins for details.
- Download and install the Node.js framework.
- Download and install the nodeunit testing framework
To create Nodeunit tests, perform these general steps
To create a Nodeunit run configuration
Open the Run/Debug Configuration dialog box by doing one of the following:
- On the main menu, choose Run | Edit Configurations .
- Press RunConfiguration and choose Edit Configuration on the context menu.
- Click the Add button on the toolbar and select the Nodeunit configuration type.
In the dialog box that opens, specify the following:
- The name to identify the configuration.
The path to the NodeJS installation to use.
If you have appointed one of the installations as default, the field displays the path to its executable file.
The working directory. This can be the project root folder or the parent directory for the
The scope of tests to run.
- Apply the changes and close the dialog box.