Skip to content

Commit ad29daa

Browse files
committed
update testing index
1 parent 271cb8d commit ad29daa

File tree

1 file changed

+4
-30
lines changed

1 file changed

+4
-30
lines changed

guides/release/testing/index.md

Lines changed: 4 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -14,46 +14,20 @@ Writing tests is also a fun activity, a nice change of pace from delivering feat
1414

1515
You have a few options for running tests.
1616

17-
First, you can run the test suite by entering the command `ember test`, or `ember t`, in your terminal. This will run the suite just once.
17+
First, you can run the test suite by entering the command `npm test` in your terminal. This will run the suite just once using the test command that is specified in your `package.json` `scripts.test` entry.
1818

1919
Running a local development server (through `npm start`), you can visit the `/tests` URI. This will render the `tests/index.html` template. This will also auto-update as you are changing files in your app.
2020

2121
```bash
2222
# Run all tests once
23-
ember test
24-
ember t
23+
npm test
2524
```
2625

2726
### How to Filter Tests
2827

29-
When you are working on a single component or page, you will want only a small subset of tests to run after every file change. To specify which tests to run, you can add `--module` or `--filter` option to your command.
28+
When you start your dev server and havigate to `/tests` you will be presented with the QUnit interface. At the top of that page you will see a `Filter` input that you can use to run a smaller subset of your tests.
3029

31-
The `--module` option allows you to select a **module**—a group of tests that you specified in `module()` in QUnit.
32-
33-
```bash
34-
# Button component example
35-
ember test --module="Integration | Component | simple-button"
36-
37-
# Run tests for a location service
38-
ember t -m="Unit | Service | location"
39-
```
40-
41-
The `--filter` option is more versatile. You can provide a phrase to match against the modules and test descriptions. A test description is what appears in `test()` in QUnit.
42-
43-
```bash
44-
# Button component example
45-
ember test --filter="should show icon and label"
46-
47-
# Test everything related to your dashboard
48-
ember t -f="Dashboard"
49-
50-
# Run integration tests
51-
ember t -f="Integration"
52-
```
53-
54-
In QUnit, you can exclude tests by adding an exclamation point to the beginning of the filter, e.g. `ember test --filter="!Acceptance"`.
55-
56-
To learn more about options for testing, you can visit [Ember CLI Documentation](https://ember-cli.com/testing) or type `ember help test` in the command line.
30+
You can also click the `Rerun` link beside any of the tests listed in QUnit interface to just rerun that one test. This is especially useful if you are working on a single component and want to run the corresponding unit or integration tests while you develop that component.
5731

5832
## How to Debug Tests
5933

0 commit comments

Comments
 (0)