From 0d28bd1b5f11ae810349e1d4523b5d8dbb666312 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Kov=C3=A1cs?= Date: Tue, 4 Apr 2017 17:09:17 +0200 Subject: [PATCH 1/2] [karma] Add concurrency property to config options. --- types/karma/index.d.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/types/karma/index.d.ts b/types/karma/index.d.ts index 8cae4a0fa4..7755011ca6 100644 --- a/types/karma/index.d.ts +++ b/types/karma/index.d.ts @@ -205,6 +205,14 @@ declare namespace karma { * @description Enable or disable colors in the output (reporters and logs). */ colors?: boolean; + /** + * @default 'Infinity' + * @description How many browsers Karma launches in parallel. + * Especially on services like SauceLabs and Browserstack, it makes sense only to launch a limited + * amount of browsers at once, and only start more when those have finished. Using this configuration, + * you can specify how many browsers should be running at once at any given point in time. + */ + concurrency?: number; /** * @default [] * @description List of files/patterns to exclude from loaded files. From be1f3e0efb5dd02f81ea25ac40a0c5c95bbb378e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Kov=C3=A1cs?= Date: Wed, 5 Apr 2017 08:37:49 +0200 Subject: [PATCH 2/2] [karma] Add constants object to karma module --- types/karma/index.d.ts | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/types/karma/index.d.ts b/types/karma/index.d.ts index 7755011ca6..59590b0a6d 100644 --- a/types/karma/index.d.ts +++ b/types/karma/index.d.ts @@ -28,8 +28,33 @@ declare namespace karma { stopper: Stopper; launcher: Launcher; VERSION: string; + constants: Constants; } + interface Constants { + VERSION: string; + DEFAULT_PORT: number; + DEFAULT_HOSTNAME: string; + DEFAULT_LISTEN_ADDR: string; + LOG_DISABLE: string; + LOG_ERROR: string; + LOG_WARN: string; + LOG_INFO: string; + LOG_DEBUG: string; + LOG_LOG: string; + LOG_PRIORITIES: string[]; + COLOR_PATTERN: string; + NO_COLOR_PATTERN: string; + CONSOLE_APPENDER: { + type: string; + layout: { + type: string; + pattern: string; + }; + }; + EXIT_CODE: string; + } + interface LauncherStatic { generateId(): string; //TODO: injector should be of type `di.Injector`