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

Commit 0d8c37d

Browse files
authored
chore(config): optional params and formatting fixes (#3351)
1 parent 7442726 commit 0d8c37d

File tree

1 file changed

+16
-22
lines changed

1 file changed

+16
-22
lines changed

lib/config.ts

+16-22
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ export interface Config {
160160
* 'spec/*_spec.js'
161161
* ]
162162
*/
163-
specs: Array<string>;
163+
specs?: Array<string>;
164164

165165
/**
166166
* Patterns to exclude specs.
@@ -284,9 +284,8 @@ export interface Config {
284284
* `multiCapabilities`.
285285
*
286286
* If this returns a promise, it is resolved immediately after
287-
* `beforeLaunch`
288-
* is run, and before any driver is set up. If this is specified, both
289-
* capabilities and multiCapabilities will be ignored.
287+
* `beforeLaunch` is run, and before any driver is set up. If this is
288+
* specified, both capabilities and multiCapabilities will be ignored.
290289
*/
291290
getMultiCapabilities?: any;
292291

@@ -310,15 +309,14 @@ export interface Config {
310309

311310
/**
312311
* CSS Selector for the element housing the angular app - this defaults to
313-
* body, but is necessary if ng-app is on a descendant of <body>.
312+
* 'body', but is necessary if ng-app is on a descendant of <body>.
314313
*/
315314
rootElement?: string;
316315

317316
/**
318317
* The timeout in milliseconds for each script run on the browser. This
319318
* should be longer than the maximum time your application needs to
320-
* stabilize
321-
* between tasks.
319+
* stabilize between tasks.
322320
*/
323321
allScriptsTimeout?: number;
324322

@@ -329,8 +327,7 @@ export interface Config {
329327

330328
/**
331329
* A callback function called once configs are read but before any
332-
* environment
333-
* setup. This will only run once, and before onPrepare.
330+
* environment setup. This will only run once, and before onPrepare.
334331
*
335332
* You can specify a file containing code to run by setting beforeLaunch to
336333
* the filename string.
@@ -350,9 +347,8 @@ export interface Config {
350347
* the filename string. onPrepare can optionally return a promise, which
351348
* Protractor will wait for before continuing execution. This can be used if
352349
* the preparation involves any asynchronous calls, e.g. interacting with
353-
* the
354-
* browser. Otherwise Protractor cannot guarantee order of execution and may
355-
* start the tests before preparation finishes.
350+
* the browser. Otherwise Protractor cannot guarantee order of execution
351+
* and may start the tests before preparation finishes.
356352
*
357353
* At this point, global variable 'protractor' object will be set up, and
358354
* globals from the test framework will be available. For example, if you
@@ -373,10 +369,9 @@ export interface Config {
373369
onPrepare?: () => {};
374370

375371
/**
376-
* A callback function called once tests are finished.
377-
* onComplete can optionally return a promise, which Protractor will wait
378-
* for
379-
* before shutting down webdriver.
372+
* A callback function called once tests are finished. onComplete can
373+
* optionally return a promise, which Protractor will wait for before
374+
* shutting down webdriver.
380375
*
381376
* At this point, tests will be done but global objects will still be
382377
* available.
@@ -394,7 +389,7 @@ export interface Config {
394389
* A callback function called once all tests have finished running and
395390
* the WebDriver instance has been shut down. It is passed the exit code
396391
* (0 if the tests passed). afterLaunch must return a promise if you want
397-
* asynchronous code to be executed before the program exits.
392+
* asynchronous code to be executed before the program exits.
398393
* This is called only once before the program exits (after onCleanUp).
399394
*/
400395
afterLaunch?: (exitCode: number) => {};
@@ -432,10 +427,8 @@ export interface Config {
432427

433428
/**
434429
* Protractor will track outstanding $timeouts by default, and report them
435-
* in
436-
* the error message if Protractor fails to synchronize with Angular in
437-
* time.
438-
* In order to do this Protractor needs to decorate $timeout.
430+
* in the error message if Protractor fails to synchronize with Angular in
431+
* time. In order to do this Protractor needs to decorate $timeout.
439432
*
440433
* CAUTION: If your app decorates $timeout, you must turn on this flag. This
441434
* is false by default.
@@ -449,6 +442,7 @@ export interface Config {
449442

450443
/**
451444
* Test framework to use. This may be one of: jasmine, mocha or custom.
445+
* Default value is 'jasmine'
452446
*
453447
* When the framework is set to "custom" you'll need to additionally
454448
* set frameworkPath with the path relative to the config file or absolute:
@@ -463,7 +457,7 @@ export interface Config {
463457
* Mocha has limited support. You will need to include your
464458
* own assertion framework (such as Chai) if working with Mocha.
465459
*/
466-
framework: string;
460+
framework?: string;
467461

468462
/**
469463
* Options to be passed to jasmine.

0 commit comments

Comments
 (0)