... | @@ -10,3 +10,22 @@ |
... | @@ -10,3 +10,22 @@ |
|
|
|
|
|
---
|
|
---
|
|
|
|
|
|
|
|
## Setting up the Karma config
|
|
|
|
|
|
|
|
* Find the Karma configuration file in your project panel
|
|
|
|
* Your project window shows all of the files in your project. It's visibility can be toggled by choosing the **View** > **Tool Windows** > **Project** menu item.
|
|
|
|
* You Karma config file should look something like this: `karma.conf.js`.
|
|
|
|
* Right-click the Karma config file and choose **Run 'karma.conf.js'
|
|
|
|
* This will run the Karma tests, and save a run configuration. Assuming your tests ran properly, you are done with the setup step.
|
|
|
|
* To edit the configuration, you can choose the **Run** > **Edit Configurations...** menu item.
|
|
|
|
* Alternatively, you can also find the **Edit Configurations...** option in the dropdown located on the PhpStorm toolbar, near the **Run** button _(has green "play" icon)_.
|
|
|
|
|
|
|
|
## Running Karma Tests
|
|
|
|
|
|
|
|
* First, make sure the your Karma configuration is the current configuration for the PhpStorm **Run** tool
|
|
|
|
* You can select it from the dropdown located on the PhpStorm toolbar, near the **Run** button _(has green "play" icon)_.
|
|
|
|
* Alternatively, you can choose **Run** > **Run...** from the menu.
|
|
|
|
* Now, you can run your tests
|
|
|
|
* Click the **Run** button _(has green "play" icon)_ on the PhpStorm toolbar
|
|
|
|
* Alternatively, you can choose **Run** > **Run 'karma.conf.js'** from the menu.
|
|
|
|
* Once your tests have run, there is a helpful "Auto-test" button that will automatically run your tests for you while you code. It is located in the Karma window panel that pops up when you run your tests. Look for it right below the **Run** button. |
|
|
|
\ No newline at end of file |