\href{https://github.com/karma-runner/karma-chrome-launcher}{\texttt{ }} \href{https://www.npmjs.com/package/karma-chrome-launcher}{\texttt{ }} \href{https://www.npmjs.com/package/karma-chrome-launcher}{\texttt{ }}

\href{https://travis-ci.org/karma-runner/karma-chrome-launcher}{\texttt{ }} \href{https://david-dm.org/karma-runner/karma-chrome-launcher}{\texttt{ }} \href{https://david-dm.org/karma-runner/karma-chrome-launcher\#info=devDependencies}{\texttt{ }}

\begin{quote}
Launcher for Google Chrome, Google Chrome Canary and Google Chromium. \end{quote}
\hypertarget{md_sfcode_node_modules_karma_chrome_launcher_README_autotoc_md15640}{}\doxysection{Installation}\label{md_sfcode_node_modules_karma_chrome_launcher_README_autotoc_md15640}
The easiest way is to keep {\ttfamily karma-\/chrome-\/launcher} as a dev\+Dependency in your {\ttfamily package.\+json}, by running


\begin{DoxyCode}{0}
\DoxyCodeLine{\$ npm i -\/D karma-\/chrome-\/launcher }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_karma_chrome_launcher_README_autotoc_md15641}{}\doxysection{Configuration}\label{md_sfcode_node_modules_karma_chrome_launcher_README_autotoc_md15641}

\begin{DoxyCode}{0}
\DoxyCodeLine{// karma.conf.js}
\DoxyCodeLine{module.exports = function(config) \{}
\DoxyCodeLine{  config.set(\{}
\DoxyCodeLine{    browsers: ['Chrome', 'Chrome\_without\_security'], // You may use 'ChromeCanary', 'Chromium' or any other supported browser}
\DoxyCodeLine{}
\DoxyCodeLine{    // you can define custom flags}
\DoxyCodeLine{    customLaunchers: \{}
\DoxyCodeLine{      Chrome\_without\_security: \{}
\DoxyCodeLine{        base: 'Chrome',}
\DoxyCodeLine{        flags: ['-\/-\/disable-\/web-\/security', '-\/-\/disable-\/site-\/isolation-\/trials']}
\DoxyCodeLine{      \}}
\DoxyCodeLine{    \}}
\DoxyCodeLine{  \})}
\DoxyCodeLine{\} }

\end{DoxyCode}


The {\ttfamily -\/-\/user-\/data-\/dir} is set to a temporary directory but can be overridden on a custom launcher as shown below. One reason to do this is to have a permanent Chrome user data directory inside the project directory to be able to install plugins there (e.\+g. Jet\+Brains IDE Support plugin).


\begin{DoxyCode}{0}
\DoxyCodeLine{customLaunchers: \{}
\DoxyCodeLine{  Chrome\_with\_debugging: \{}
\DoxyCodeLine{    base: 'Chrome',}
\DoxyCodeLine{    chromeDataDir: path.resolve(\_\_dirname, '.chrome')}
\DoxyCodeLine{  \}}
\DoxyCodeLine{\} }

\end{DoxyCode}


You can pass list of browsers as a CLI argument too\+:


\begin{DoxyCode}{0}
\DoxyCodeLine{\$ karma start -\/-\/browsers Chrome,Chrome\_without\_security }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_karma_chrome_launcher_README_autotoc_md15642}{}\doxysection{Headless Chromium with Puppeteer}\label{md_sfcode_node_modules_karma_chrome_launcher_README_autotoc_md15642}
The Chrome Dev\+Tools team created \href{https://github.com/GoogleChrome/puppeteer}{\texttt{ Puppeteer}} -\/ it will automatically install Chromium for all platforms and contains everything you need to run it from within your CI.\hypertarget{md_sfcode_node_modules_karma_chrome_launcher_README_autotoc_md15643}{}\doxysubsection{Available Browsers}\label{md_sfcode_node_modules_karma_chrome_launcher_README_autotoc_md15643}
{\itshape Note\+: Headless mode requires a browser version $>$= 59}


\begin{DoxyItemize}
\item Chrome (CHROME\+\_\+\+BIN)
\item Chrome\+Headless (CHROME\+\_\+\+BIN)
\item Chromium (CHROMIUM\+\_\+\+BIN)
\item Chromium\+Headless (CHROMIUM\+\_\+\+BIN)
\item Chrome\+Canary (CHROME\+\_\+\+CANARY\+\_\+\+BIN)
\item Chrome\+Canary\+Headless (CHROME\+\_\+\+CANARY\+\_\+\+BIN)
\item Dartium (DARTIUM\+\_\+\+BIN)
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_karma_chrome_launcher_README_autotoc_md15644}{}\doxysubsubsection{Usage}\label{md_sfcode_node_modules_karma_chrome_launcher_README_autotoc_md15644}

\begin{DoxyCode}{0}
\DoxyCodeLine{\$ npm i -\/D puppeteer karma-\/chrome-\/launcher }

\end{DoxyCode}



\begin{DoxyCode}{0}
\DoxyCodeLine{// karma.conf.js}
\DoxyCodeLine{process.env.CHROME\_BIN = require('puppeteer').executablePath()}
\DoxyCodeLine{}
\DoxyCodeLine{module.exports = function(config) \{}
\DoxyCodeLine{  config.set(\{}
\DoxyCodeLine{    browsers: ['ChromeHeadless']}
\DoxyCodeLine{  \})}
\DoxyCodeLine{\} }

\end{DoxyCode}


\DoxyHorRuler{0}


For more information on Karma see the \href{http://karma-runner.github.com}{\texttt{ homepage}}. 