If you want to add extra information to the reporter output, you can build your own display processor and add it to options in the custom\+Processors array.\hypertarget{md_sfcode_node_modules_jasmine_spec_reporter_docs_customize_output_autotoc_md13899}{}\doxysection{Example}\label{md_sfcode_node_modules_jasmine_spec_reporter_docs_customize_output_autotoc_md13899}
Let\textquotesingle{}s say that you want to add the current time before each output of the reporter in order to have something like this\+: \begin{DoxyVerb}Spec started

  10:40:12 - first suite
    10:40:12 - ✓ should be ok
    10:40:21 - ✗ should failed
      - Expected true to be false.
    10:40:35 - ✓ should be ok
\end{DoxyVerb}
\hypertarget{md_sfcode_node_modules_jasmine_spec_reporter_docs_customize_output_autotoc_md13900}{}\doxysubsection{Build your display processor}\label{md_sfcode_node_modules_jasmine_spec_reporter_docs_customize_output_autotoc_md13900}
You need to require the display processor\+:


\begin{DoxyCode}{0}
\DoxyCodeLine{var DisplayProcessor = require('jasmine-\/spec-\/reporter').DisplayProcessor; }

\end{DoxyCode}


You can then customize the following methods\+:
\begin{DoxyItemize}
\item display\+Jasmine\+Started(runner, log)
\item display\+Suite(suite, log)
\item display\+Spec\+Started(spec, log)
\item display\+Successful\+Spec(spec, log)
\item display\+Failed\+Spec(spec, log)
\item display\+Spec\+Error\+Messages(spec, log)
\item display\+Summary\+Error\+Messages(spec, log)
\item display\+Pending\+Spec(spec, log)
\end{DoxyItemize}

The first argument is the jasmine object corresponding to the suite or the spec. The second argument is the log to be displayed. Those methods should return the modified log.

For our example\+:


\begin{DoxyCode}{0}
\DoxyCodeLine{var DisplayProcessor = require('jasmine-\/spec-\/reporter').DisplayProcessor;}
\DoxyCodeLine{}
\DoxyCodeLine{function TimeProcessor(configuration) \{}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{function getTime() \{}
\DoxyCodeLine{    var now = new Date();}
\DoxyCodeLine{    return now.getHours() + ':' +}
\DoxyCodeLine{           now.getMinutes() + ':' +}
\DoxyCodeLine{           now.getSeconds()}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{TimeProcessor.prototype = new DisplayProcessor();}
\DoxyCodeLine{}
\DoxyCodeLine{TimeProcessor.prototype.displaySuite = function (suite, log) \{}
\DoxyCodeLine{  return getTime() + ' -\/ ' + log;}
\DoxyCodeLine{\};}
\DoxyCodeLine{}
\DoxyCodeLine{TimeProcessor.prototype.displaySuccessfulSpec = function (spec, log) \{}
\DoxyCodeLine{  return getTime() + ' -\/ ' + log;}
\DoxyCodeLine{\};}
\DoxyCodeLine{}
\DoxyCodeLine{TimeProcessor.prototype.displayFailedSpec = function (spec, log) \{}
\DoxyCodeLine{  return getTime() + ' -\/ ' + log;}
\DoxyCodeLine{\};}
\DoxyCodeLine{}
\DoxyCodeLine{TimeProcessor.prototype.displayPendingSpec = function (spec, log) \{}
\DoxyCodeLine{  return getTime() + ' -\/ ' + log;}
\DoxyCodeLine{\}; }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_jasmine_spec_reporter_docs_customize_output_autotoc_md13901}{}\doxysubsection{Add it to the configuration}\label{md_sfcode_node_modules_jasmine_spec_reporter_docs_customize_output_autotoc_md13901}
Then you need to configure jasmine spec reporter to use your processor\+:


\begin{DoxyCode}{0}
\DoxyCodeLine{var SpecReporter = require('jasmine-\/spec-\/reporter').SpecReporter;}
\DoxyCodeLine{}
\DoxyCodeLine{var reporter = new SpecReporter(\{}
\DoxyCodeLine{    customProcessors: [TimeProcessor]}
\DoxyCodeLine{\});}
\DoxyCodeLine{}
\DoxyCodeLine{jasmine.getEnv().addReporter(reporter); }

\end{DoxyCode}


You must pass the processor constructor in the custom\+Processors array. Jasmine spec reporter will instantiate it with the options if you need them. You can add as many processors as you want, they will be applied in the order which they are in the custom\+Processors array. 