You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/config/01-configuration-file.md
+78-58Lines changed: 78 additions & 58 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -79,14 +79,6 @@ multiple changes into a single run so that the test runner doesn't try to start
79
79
tests more than it should. The configuration setting tells Karma how long to wait (in milliseconds) after any changes
80
80
have occurred before starting the test process again.
81
81
82
-
## restartOnFileChange
83
-
**Type:** Boolean
84
-
85
-
**Default:**`false`
86
-
87
-
**Description:** When Karma is watching the files for changes, it will delay a new run until
88
-
the current run is finished. Enabling this setting will cancel the current run and start a new run
89
-
immediately when a change is detected.
90
82
91
83
## basePath
92
84
**Type:** String
@@ -183,6 +175,36 @@ The `client.args` option allows you to set this value for actions other than `ru
183
175
How this value is used is up to your test adapter - you should check your adapter's
184
176
documentation to see how (and if) it uses this value.
185
177
178
+
179
+
## client.useIframe
180
+
**Type:** Boolean
181
+
182
+
**Default:**`true`
183
+
184
+
**Description:** Run the tests inside an iFrame or a new window
185
+
186
+
If true, Karma runs the tests inside an iFrame. If false, Karma runs the tests in a new window. Some tests may not run in an
187
+
iFrame and may need a new window to run.
188
+
189
+
190
+
## client.captureConsole
191
+
**Type:** Boolean
192
+
193
+
**Default:**`true`
194
+
195
+
**Description:** Capture all console output and pipe it to the terminal.
196
+
197
+
198
+
## client.clearContext
199
+
**Type:** Boolean
200
+
201
+
**Default:**`true`
202
+
203
+
**Description:** Clear the context window
204
+
205
+
If true, Karma clears the context window upon the completion of running the tests. If false, Karma does not clear the context window
206
+
upon the completion of running the tests. Setting this to false is useful when embedding a Jasmine Spec Runner Template.
207
+
186
208
## colors
187
209
**Type:** Boolean
188
210
@@ -193,6 +215,16 @@ documentation to see how (and if) it uses this value.
193
215
**Description:** Enable or disable colors in the output (reporters and logs).
194
216
195
217
218
+
## concurrency
219
+
**Type:** Number
220
+
221
+
**Default:**`Infinity`
222
+
223
+
**Description:** How many browser Karma launches in parallel.
224
+
225
+
Especially on sevices like SauceLabs and Browserstack it makes sense to only launch a limited amount of browsers at once, and only start more when those have finished. Using this configuration you can sepcify how many browsers should be running at once at any given point in time.
226
+
227
+
196
228
## customHeaders
197
229
**Type:** Array
198
230
@@ -336,6 +368,25 @@ plugins: [
336
368
]
337
369
```
338
370
371
+
372
+
## mime
373
+
**Type:** Object
374
+
375
+
**Default:**`{}`
376
+
377
+
**Description:** Redefine default mapping from file extensions to MIME-type
378
+
379
+
Set property name to required MIME, provide Array of extensions (without dots) as it's value
380
+
381
+
**Example:**
382
+
```javascript
383
+
mime: {
384
+
'text/x-typescript': ['ts','tsx']
385
+
'text/plain': ['mytxt']
386
+
}
387
+
```
388
+
389
+
339
390
## plugins
340
391
**Type:** Array
341
392
@@ -396,6 +447,7 @@ Determines the use of the Node `http` or `https` class.
396
447
397
448
Note: Using `'https:'` requires you to specify `httpsServerOptions`.
398
449
450
+
399
451
## proxies
400
452
**Type:** Object
401
453
@@ -458,6 +510,24 @@ Additional reporters, such as `growl`, `junit`, `teamcity` or `coverage` can be
458
510
Note: Just about all additional reporters in Karma (other than progress) require an additional library to be installed (via NPM).
459
511
460
512
513
+
## restartOnFileChange
514
+
**Type:** Boolean
515
+
516
+
**Default:**`false`
517
+
518
+
**Description:** When Karma is watching the files for changes, it will delay a new run until
519
+
the current run is finished. Enabling this setting will cancel the current run and start a new run
520
+
immediately when a change is detected.
521
+
522
+
523
+
## retryLimit
524
+
**Type:** Number
525
+
526
+
**Default:** 2
527
+
528
+
**Description:** When a browser crashes, karma will try to relaunch. This defines how many times karma should relaunch
529
+
a browser before giving up.
530
+
461
531
## singleRun
462
532
**Type:** Boolean
463
533
@@ -470,22 +540,6 @@ Note: Just about all additional reporters in Karma (other than progress) require
470
540
If `true`, Karma will start and capture all configured browsers, run tests and then exit with an exit code of `0` or `1` depending
471
541
on whether all tests passed or any tests failed.
472
542
473
-
## mime
474
-
**Type:** Object
475
-
476
-
**Default:**`{}`
477
-
478
-
**Description:** Redefine default mapping from file extensions to MIME-type
479
-
480
-
Set property name to required MIME, provide Array of extensions (without dots) as it's value
481
-
482
-
**Example:**
483
-
```javascript
484
-
mime: {
485
-
'text/x-typescript': ['ts','tsx']
486
-
'text/plain': ['mytxt']
487
-
}
488
-
```
489
543
490
544
491
545
## transports
@@ -497,32 +551,6 @@ mime: {
497
551
is handed off to [socket.io](http://socket.io/) (which manages the communication
498
552
between browsers and the testing server).
499
553
500
-
## client.useIframe
501
-
**Type:** Boolean
502
-
503
-
**Default:**`true`
504
-
505
-
**Description:** Run the tests inside an iFrame or a new window
506
-
507
-
If true, Karma runs the tests inside an iFrame. If false, Karma runs the tests in a new window. Some tests may not run in an
508
-
iFrame and may need a new window to run.
509
-
510
-
## client.captureConsole
511
-
**Type:** Boolean
512
-
513
-
**Default:**`true`
514
-
515
-
**Description:** Capture all console output and pipe it to the terminal.
516
-
517
-
## client.clearContext
518
-
**Type:** Boolean
519
-
520
-
**Default:**`true`
521
-
522
-
**Description:** Clear the context window
523
-
524
-
If true, Karma clears the context window upon the completion of running the tests. If false, Karma does not clear the context window
525
-
upon the completion of running the tests. Setting this to false is useful when embedding a Jasmine Spec Runner Template.
526
554
527
555
## urlRoot
528
556
**Type:** String
@@ -534,14 +562,6 @@ upon the completion of running the tests. Setting this to false is useful when
534
562
All of Karma's urls get prefixed with the `urlRoot`. This is helpful when using proxies, as
535
563
sometimes you might want to proxy a url that is already taken by Karma.
536
564
537
-
## concurrency
538
-
**Type:** Number
539
-
540
-
**Default:**`Infinity`
541
-
542
-
**Description:** How many browser Karma launches in parallel.
543
-
544
-
Especially on sevices like SauceLabs and Browserstack it makes sense to only launch a limited amount of browsers at once, and only start more when those have finished. Using this configuration you can sepcify how many browsers should be running at once at any given point in time.
0 commit comments