From 26c041f9a1a796a48a72768223ed909e20111276 Mon Sep 17 00:00:00 2001 From: Pine Mizune Date: Fri, 31 Aug 2018 16:39:07 +0900 Subject: [PATCH] Add `customLaunchers` --- types/karma/index.d.ts | 8 ++++++++ types/karma/karma-tests.ts | 6 ++++++ 2 files changed, 14 insertions(+) diff --git a/types/karma/index.d.ts b/types/karma/index.d.ts index cc4525566b..4b71c0a723 100644 --- a/types/karma/index.d.ts +++ b/types/karma/index.d.ts @@ -248,6 +248,7 @@ declare namespace karma { * you can specify how many browsers should be running at once at any given point in time. */ concurrency?: number; + customLaunchers?: { [key: string]: CustomLauncher }; /** * @default [] * @description List of files/patterns to exclude from loaded files. @@ -470,6 +471,13 @@ declare namespace karma { */ nocache?: boolean; } + + interface CustomLauncher { + base: string; + browserName?: string; + flags?: string[]; + platform?: string; + } } declare var karma: karma.Karma; diff --git a/types/karma/karma-tests.ts b/types/karma/karma-tests.ts index 6d9b8abd9f..a8adc36f45 100644 --- a/types/karma/karma-tests.ts +++ b/types/karma/karma-tests.ts @@ -106,6 +106,12 @@ module.exports = function(config: karma.Config) { 'Chrome', 'Firefox' ], + customLaunchers: { + ChromiumHeadless_without_security: { + base: 'ChromiumHeadless', + flags: ['--no-sandbox', '--disable-setuid-sandbox'], + }, + }, singleRun: true });