Skip to content

Commit

Permalink
Add an additional npm-based recipe for Jetbrains IDEs (#1444)
Browse files Browse the repository at this point in the history
  • Loading branch information
suchmaske authored and novemberborn committed Jul 12, 2017
1 parent 4a769f8 commit 2b4e35d
Showing 1 changed file with 31 additions and 1 deletion.
32 changes: 31 additions & 1 deletion docs/recipes/debugging-with-webstorm.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Translations: [Français](https://github.com/avajs/ava-docs/blob/master/fr_FR/do
Starting with version 2016.2, [WebStorm](https://www.jetbrains.com/webstorm/) and other JetBrains IDEs (IntelliJ IDEA Ultimate, PHPStorm, PyCharm Professional, and RubyMine with installed Node.js plugin) allow you to debug AVA tests.


## Setup
## Setup using Node.js

Add a new *Node.js Run/Debug configuration*: select `Edit Configurations...` from the dropdown list on the top right, then click `+` and select *Node.js*.

Expand All @@ -15,6 +15,36 @@ In the `Application parameters` pass the CLI flags you're using and the test fil

Save the configuration.

## Setup using npm

Execute `ava --init` in your project directory to add AVA to your `package.json`.

Your `package.json` will look something like this:

```json
{
"name": "awesome-package",
"scripts": {
"test": "ava"
},
"devDependencies": {
"ava": "^0.20.0"
}
}
```

Add a new *npm Run/Debug configuration*: select `Edit Configurations...` from the dropdown list on the top right, then click `+` and select *npm*.

Use the following configuration parameters:

- `package.json`: Path to your project's `package.json` file
- `Command`: `test`

Your IDE will then execute `npm run test` and thus call `node_modules/.bin/ava` and the AVA-configuration you have specified in your package.json.

Don't forget to select a Node.js interpreter.

Save the configuration.

## Debug

Expand Down

0 comments on commit 2b4e35d

Please sign in to comment.