Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 88cb9af

Browse files
authored
docs(DEVELOPERS.md): improve testing section
1 parent e942e1e commit 88cb9af

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

DEVELOPERS.md

+12-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Developing AngularJS
22

33
* [Development Setup](#setup)
4+
* [Running Tests](#tests)
45
* [Coding Rules](#rules)
56
* [Commit Message Guidelines](#commits)
67
* [Writing Documentation](#documentation)
@@ -107,6 +108,8 @@ HTTP server. For this purpose, we have made available a local web server based o
107108
http://localhost:8000/build/docs/
108109
```
109110

111+
## <a name="tests"> Running Tests
112+
110113
### <a name="unit-tests"></a> Running the Unit Test Suite
111114

112115
We write unit and integration tests with Jasmine and execute them with Karma. To run all of the
@@ -116,24 +119,27 @@ tests once on Chrome run:
116119
yarn grunt test:unit
117120
```
118121

119-
To run the tests on other browsers (Chrome, ChromeCanary, Firefox and Safari are pre-configured) use:
122+
To run the tests on other browsers (Chrome and Firefox are pre-configured) use:
120123

121124
```shell
122125
yarn grunt test:unit --browsers=Chrome,Firefox
123126
```
124127

125128
**Note:** there should be _no spaces between browsers_. `Chrome, Firefox` is INVALID.
126129

130+
If you want to test locally on Safari, Internet Explorer, or Edge, you must install
131+
the respective `karma-<browser>-launcher` from npm.
132+
127133
If you have a Saucelabs or Browserstack account, you can also run the unit tests on these services
128-
via our pre-defined customLaunchers.
134+
via our pre-defined customLaunchers. See the [karma config file](/karma-shared.conf.js) for all pre-configured browsers.
129135

130-
For example, to run the whole unit test suite:
136+
For example, to run the whole unit test suite on selected browsers:
131137

132138
```shell
133139
# Browserstack
134-
yarn grunt test:unit --browsers=BS_Chrome,BS_Firefox,BS_Safari,BS_IE_9,BS_IE_10,BS_IE_11,BS_EDGE,BS_iOS_8,BS_iOS_9,BS_iOS_10
140+
yarn grunt test:unit --browsers=BS_Chrome,BS_Firefox,BS_Safari,BS_IE_9,BS_IE_10,BS_IE_11,BS_EDGE,BS_iOS_10
135141
# Saucelabs
136-
yarn grunt test:unit --browsers=BS_Chrome,BS_Firefox,BS_Safari,BS_IE_9,BS_IE_10,BS_IE_11,BS_EDGE,BS_iOS_8,BS_iOS_9,BS_iOS_10
142+
yarn grunt test:unit --browsers=SL_Chrome,SL_Firefox,SL_Safari,SL_IE_9,SL_IE_10,SL_IE_11,SL_EDGE,SL_iOS_10
137143
```
138144

139145
Running these commands requires you to set up [Karma Browserstack][karma-browserstack] or
@@ -483,4 +489,4 @@ You can see an example of a well-defined example [in the `ngRepeat` documentatio
483489
[karma-browserstack]: https://github.com/karma-runner/karma-browserstack-launcher
484490
[karma-saucelabs]: https://github.com/karma-runner/karma-sauce-launcher
485491
[unit-testing]: https://docs.angularjs.org/guide/unit-testing
486-
[yarn-install]: https://yarnpkg.com/en/docs/install
492+
[yarn-install]: https://yarnpkg.com/en/docs/install

0 commit comments

Comments
 (0)